Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- type ToJsonFormatField rs = Rec ToJson rs
- type FromJsonFormatField e rs = Rec (FromJson e) rs
- type JsonFormatField e rs = Rec (JsonFormat e) rs
- class DefaultJsonFormatField (rs :: [Type]) where
- fieldToJson :: forall (rs :: [Type]) r' (rs' :: [Type]). (rs ~ (r' ': rs'), RApply rs, RMap rs, RecApplicative rs, RecWithContext rs rs, RecordToList rs', ReifyNames rs) => SumStyle -> ToJsonFormatField rs -> Field rs -> Value
- fieldFromJson :: forall (rs :: [Type]) r' (rs' :: [Type]) e. (rs ~ (r' ': rs'), RApply rs, RMap rs, RecApplicative rs, RecWithContext rs rs, RecordToList rs', ReifyNames rs) => SumStyle -> FromJsonFormatField e rs -> Parse e (Field rs)
- fieldJsonFormat :: forall (rs :: [Type]) r' (rs' :: [Type]) e. (rs ~ (r' ': rs'), RApply rs, RMap rs, RecApplicative rs, RecWithContext rs rs, RecordToList rs', ReifyNames rs) => SumStyle -> JsonFormatField e rs -> JsonFormat e (Field rs)
Documentation
type ToJsonFormatField rs = Rec ToJson rs Source #
Type of records which contain JSON encoders for each element of rs
.
type FromJsonFormatField e rs = Rec (FromJson e) rs Source #
Type of records which contain JSON decoders for each element of rs
.
type JsonFormatField e rs = Rec (JsonFormat e) rs Source #
Type of records which contain JSON formats for each element of rs
.
class DefaultJsonFormatField (rs :: [Type]) 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
.
Instances
DefaultJsonFormatField ('[] :: [Type]) Source # | |
Defined in Composite.Aeson.CoRecord defaultJsonFormatField :: JsonFormatField e '[] Source # | |
(DefaultJsonFormat a, DefaultJsonFormatField rs) => DefaultJsonFormatField ((s :-> a) ': rs) Source # | |
Defined in Composite.Aeson.CoRecord defaultJsonFormatField :: JsonFormatField e ((s :-> a) ': rs) Source # |
fieldToJson :: forall (rs :: [Type]) r' (rs' :: [Type]). (rs ~ (r' ': rs'), RApply rs, RMap rs, RecApplicative rs, RecWithContext rs rs, RecordToList rs', ReifyNames rs) => SumStyle -> ToJsonFormatField rs -> Field rs -> Value Source #
fieldFromJson :: forall (rs :: [Type]) r' (rs' :: [Type]) e. (rs ~ (r' ': rs'), RApply rs, RMap rs, RecApplicative rs, RecWithContext rs rs, RecordToList rs', ReifyNames rs) => SumStyle -> FromJsonFormatField e rs -> Parse e (Field rs) Source #
Make a
given how to map the sum type from JSON along with a record with decoders for each value the field could have.Parse
e (Field rs)
fieldJsonFormat :: forall (rs :: [Type]) r' (rs' :: [Type]) e. (rs ~ (r' ': rs'), RApply rs, RMap rs, RecApplicative rs, RecWithContext rs rs, RecordToList rs', ReifyNames rs) => SumStyle -> JsonFormatField e rs -> JsonFormat e (Field rs) Source #
Make a
given how to map the sum type to JSON along with a record with formatters for each value the field could have.JsonFormat
e (Field rs)