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

Safe HaskellNone
LanguageHaskell2010

Data.Aeson.AutoType.Plugin.Subtype

Description

API to which SubtypePlugins should conform.

Synopsis

Documentation

data SubtypePlugin Source

Operations that SubtypPlugin must implement.

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