Merge pull request #94 from danbroooks/define-applicative-for-value

Define applicative instance for Value
This commit is contained in:
Chris Allen 2018-07-12 09:23:27 -05:00 committed by GitHub
commit b91e0ad9b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -630,6 +630,9 @@ newtype Value a = Value { unValue :: a } deriving (Eq, Ord, Show, Typeable)
instance Functor Value where
fmap f (Value a) = Value (f a)
instance Applicative Value where
(<*>) (Value f) (Value a) = Value (f a)
pure = Value
-- | A list of single values. There's a limited set of functions
-- able to work with this data type (such as 'subList_select',