Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module defines data type (a :|: b) that behaves all like Either
,
except that has no tag in JSON representation as used by FromJSON
and ToJSON
.
Documentation
data a :|: b infixr 5 Source #
Data type (a :|: b) that behaves all like Either
,
except that has no tag in JSON representation as used by FromJSON
and ToJSON
.
Instances
(Eq a, Eq b) => Eq (a :|: b) Source # | |
(Ord a, Ord b) => Ord (a :|: b) Source # | |
Defined in Data.Aeson.AutoType.Alternative | |
(Show a, Show b) => Show (a :|: b) Source # | |
(FromJSON a, FromJSON b) => FromJSON (a :|: b) Source # | |
Defined in Data.Aeson.AutoType.Alternative parseJSON :: Value -> Parser (a :|: b) parseJSONList :: Value -> Parser [a :|: b] | |
(ToJSON a, ToJSON b) => ToJSON (a :|: b) Source # | |
Defined in Data.Aeson.AutoType.Alternative toEncoding :: (a :|: b) -> Encoding toJSONList :: [a :|: b] -> Value toEncodingList :: [a :|: b] -> Encoding |
fromEither :: Either a b -> a :|: b Source #
Convert from Either
datatype.