json-autotype-0.2.5.3: Automatic type declaration for JSON input data

Safe HaskellNone
LanguageHaskell2010

Data.Aeson.AutoType.Alternative

Documentation

data a :|: b infixr 5 Source

Constructors

AltLeft a 
AltRight b 

Instances

(Eq a, Eq b) => Eq ((:|:) a b) 
(Ord a, Ord b) => Ord ((:|:) a b) 
(Show a, Show b) => Show ((:|:) a b) 
(ToJSON a, ToJSON b) => ToJSON ((:|:) a b) 
(FromJSON a, FromJSON b) => FromJSON ((:|:) a b) 

toEither :: (a :|: b) -> Either a b Source

fromEither :: Either a b -> a :|: b Source

alt :: (a -> c) -> (b -> c) -> (a :|: b) -> c Source