| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Data.Aeson.AutoType.Alternative
Description
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 # | |
| (ToJSON a, ToJSON b) => ToJSON (a :|: b) Source # | |
Defined in Data.Aeson.AutoType.Alternative | |
| (FromJSON a, FromJSON b) => FromJSON (a :|: b) Source # | |
fromEither :: Either a b -> a :|: b Source #
Convert from Either datatype.