kind-generics-deriving-0.3.0.0: Generic programming in GHC style for arbitrary kinds and GADTs.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Generics.Kind.Derive.Json

Documentation

gtoJSON' :: forall t. (GenericK t, GToJSONK (RepK t) 'LoT0) => t -> Value Source #

gfromJSON' :: forall t. (GenericK t, GFromJSONK (RepK t) 'LoT0) => Value -> Parser t Source #

class GToJSONK (f :: LoT k -> Type) (x :: LoT k) where Source #

Methods

gtoJSON :: f x -> Value Source #

Instances

Instances details
GToJSONK (U1 :: LoT k -> Type) (x :: LoT k) Source # 
Instance details

Defined in Generics.Kind.Derive.Json

Methods

gtoJSON :: U1 x -> Value Source #

ToJSON (Interpret t x) => GToJSONK (Field t :: LoT k -> Type) (x :: LoT k) Source # 
Instance details

Defined in Generics.Kind.Derive.Json

Methods

gtoJSON :: Field t x -> Value Source #

(GToJSONK f x, GToJSONK g x) => GToJSONK (f :*: g :: LoT k -> Type) (x :: LoT k) Source # 
Instance details

Defined in Generics.Kind.Derive.Json

Methods

gtoJSON :: (f :*: g) x -> Value Source #

(GToJSONK f x, GToJSONK g x) => GToJSONK (f :+: g :: LoT k -> Type) (x :: LoT k) Source # 
Instance details

Defined in Generics.Kind.Derive.Json

Methods

gtoJSON :: (f :+: g) x -> Value Source #

(Interpret c x => GToJSONK f x) => GToJSONK (c :=>: f :: LoT k -> Type) (x :: LoT k) Source # 
Instance details

Defined in Generics.Kind.Derive.Json

Methods

gtoJSON :: (c :=>: f) x -> Value Source #

(forall (t :: k2). GToJSONK f (t :&&: x)) => GToJSONK (Exists k2 f :: LoT k1 -> Type) (x :: LoT k1) Source # 
Instance details

Defined in Generics.Kind.Derive.Json

Methods

gtoJSON :: Exists k2 f x -> Value Source #

(GToJSONK f x, KnownSymbol name) => GToJSONK (M1 i ('MetaCons name fx st) f :: LoT k -> Type) (x :: LoT k) Source # 
Instance details

Defined in Generics.Kind.Derive.Json

Methods

gtoJSON :: M1 i ('MetaCons name fx st) f x -> Value Source #

GToJSONK f x => GToJSONK (M1 i ('MetaData _1 _2 _3 _4) f :: LoT k -> Type) (x :: LoT k) Source # 
Instance details

Defined in Generics.Kind.Derive.Json

Methods

gtoJSON :: M1 i ('MetaData _1 _2 _3 _4) f x -> Value Source #

GToJSONK f x => GToJSONK (M1 i ('MetaSel _1 _2 _3 _4) f :: LoT k -> Type) (x :: LoT k) Source # 
Instance details

Defined in Generics.Kind.Derive.Json

Methods

gtoJSON :: M1 i ('MetaSel _1 _2 _3 _4) f x -> Value Source #

class GFromJSONK (f :: LoT k -> Type) (x :: LoT k) where Source #

Methods

gfromJSON :: Value -> Parser (f x) Source #

Instances

Instances details
GFromJSONK (U1 :: LoT k -> Type) (x :: LoT k) Source # 
Instance details

Defined in Generics.Kind.Derive.Json

Methods

gfromJSON :: Value -> Parser (U1 x) Source #

FromJSON (Interpret t x) => GFromJSONK (Field t :: LoT k -> Type) (x :: LoT k) Source # 
Instance details

Defined in Generics.Kind.Derive.Json

Methods

gfromJSON :: Value -> Parser (Field t x) Source #

(GFromJSONK f x, GFromJSONK g x) => GFromJSONK (f :*: g :: LoT k -> Type) (x :: LoT k) Source # 
Instance details

Defined in Generics.Kind.Derive.Json

Methods

gfromJSON :: Value -> Parser ((f :*: g) x) Source #

(GFromJSONK f x, GFromJSONK g x) => GFromJSONK (f :+: g :: LoT k -> Type) (x :: LoT k) Source # 
Instance details

Defined in Generics.Kind.Derive.Json

Methods

gfromJSON :: Value -> Parser ((f :+: g) x) Source #

(Interpret c x, GFromJSONK f x) => GFromJSONK (c :=>: f :: LoT k -> Type) (x :: LoT k) Source # 
Instance details

Defined in Generics.Kind.Derive.Json

Methods

gfromJSON :: Value -> Parser ((c :=>: f) x) Source #

(forall (t :: k2). GFromJSONK f (t :&&: x)) => GFromJSONK (Exists k2 f :: LoT k1 -> Type) (x :: LoT k1) Source # 
Instance details

Defined in Generics.Kind.Derive.Json

Methods

gfromJSON :: Value -> Parser (Exists k2 f x) Source #

(GFromJSONK f x, KnownSymbol name) => GFromJSONK (M1 i ('MetaCons name fx st) f :: LoT k -> Type) (x :: LoT k) Source # 
Instance details

Defined in Generics.Kind.Derive.Json

Methods

gfromJSON :: Value -> Parser (M1 i ('MetaCons name fx st) f x) Source #

GFromJSONK f x => GFromJSONK (M1 i ('MetaData _1 _2 _3 _4) f :: LoT k -> Type) (x :: LoT k) Source # 
Instance details

Defined in Generics.Kind.Derive.Json

Methods

gfromJSON :: Value -> Parser (M1 i ('MetaData _1 _2 _3 _4) f x) Source #

GFromJSONK f x => GFromJSONK (M1 i ('MetaSel _1 _2 _3 _4) f :: LoT k -> Type) (x :: LoT k) Source # 
Instance details

Defined in Generics.Kind.Derive.Json

Methods

gfromJSON :: Value -> Parser (M1 i ('MetaSel _1 _2 _3 _4) f x) Source #