Safe Haskell | None |
---|---|
Language | Haskell2010 |
- type JsonFormatField e rs = Rec (JsonFormat e) rs
- class DefaultJsonFormatField rs where
- fieldJsonFormat :: forall rs r' rs' e. (rs ~ (r' ': rs'), RecApplicative rs, RecWithContext rs rs, ReifyNames rs) => SumStyle -> JsonFormatField e rs -> JsonFormat e (Field rs)
Documentation
type JsonFormatField e rs = Rec (JsonFormat e) rs Source #
Type of records which contain JSON formats for each element of rs
.
class DefaultJsonFormatField rs where Source #
Class which makes up a JsonFormatField
for some rs
where each r ~ s :-> a
by using the DefaultJsonFormat
instance for each a
.
defaultJsonFormatField :: JsonFormatField e rs Source #
Make up a JsonFormatField
for some rs
where each r ~ s :-> a
by using the DefaultJsonFormat
instance for each a
.
DefaultJsonFormatField ([] *) Source # | |
(DefaultJsonFormat a, DefaultJsonFormatField rs) => DefaultJsonFormatField ((:) * ((:->) s a) rs) Source # | |
fieldJsonFormat :: forall rs r' rs' e. (rs ~ (r' ': rs'), RecApplicative rs, RecWithContext rs rs, ReifyNames rs) => SumStyle -> JsonFormatField e rs -> JsonFormat e (Field rs) Source #
Make a
given how to map the sum type to JSON alogn with a record with formatters for each value the field could have.JsonFormat
e (Field rs)