Merge pull request #94 from danbroooks/define-applicative-for-value
Define applicative instance for Value
This commit is contained in:
commit
b91e0ad9b8
@ -630,6 +630,9 @@ newtype Value a = Value { unValue :: a } deriving (Eq, Ord, Show, Typeable)
|
|||||||
instance Functor Value where
|
instance Functor Value where
|
||||||
fmap f (Value a) = Value (f a)
|
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
|
-- | A list of single values. There's a limited set of functions
|
||||||
-- able to work with this data type (such as 'subList_select',
|
-- able to work with this data type (such as 'subList_select',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user