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

Safe HaskellNone
LanguageHaskell2010

Data.Aeson.AutoType.Plugin.Subtype

Synopsis

Documentation

data SubtypePlugin Source

Constructors

SubtypePlugin 

Fields

detect :: [Value] -> Maybe SubtypeDesc
 
unify :: SubtypeDesc -> SubtypeDesc -> Either SubtypeDesc Type

Check whether a set of values belongs to this type family

data SubtypeDesc Source

Description of a subtype

Constructors

SubtypeDesc 

Fields

subtypeName :: String
 
subtypeClass :: Type

Code that is different for different type families

reference :: String -> String
 
declare :: String

Show type reference with a given name prefix

typeInfo :: Dynamic

Show type declaration