Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module provides "anonymous terms". These terms can be used when you don't want to write your own Haskell type, but simply have a quick and dirty interpretation for a schema type. An important limitation is that anonymous terms may only contain primitive fields.
The names of the types exposed in this module
refer to the amount of fields in the record.
Hence, use V0
for empty record, V1
for a record
with one field, V2
for two, and so forth.
Documentation
data V0 w sch sty where Source #
Anonymous term for a record with zero fields.
Instances
(sch :/: sty) ~ 'DRecord nm ('[] :: [FieldDefB Type k f]) => FromSchema w (sch :: Schema k f) (sty :: k) (V0 w sch sty) Source # | |
Defined in Mu.Schema.Interpretation.Anonymous | |
(sch :/: sty) ~ 'DRecord nm ('[] :: [FieldDefB Type k f]) => ToSchema w (sch :: Schema k f) (sty :: k) (V0 w sch sty) Source # | |
Eq (V0 w sch sty) Source # | |
Ord (V0 w sch sty) Source # | |
Defined in Mu.Schema.Interpretation.Anonymous | |
Show (V0 w sch sty) Source # | |
data V1 w sch sty where Source #
Anonymous term for a record with one field.
Instances
(Functor w, (sch :/: sty) ~ 'DRecord nm '['FieldDef f2 ('TPrimitive a :: FieldTypeB Type k)]) => FromSchema w (sch :: Schema k f1) (sty :: k) (V1 w sch sty) Source # | |
Defined in Mu.Schema.Interpretation.Anonymous | |
(Functor w, (sch :/: sty) ~ 'DRecord nm '['FieldDef f2 ('TPrimitive a :: FieldTypeB Type k)]) => ToSchema w (sch :: Schema k f1) (sty :: k) (V1 w sch sty) Source # | |
(Eq (w a), (sch :/: sty) ~ 'DRecord nm '['FieldDef f2 ('TPrimitive a :: FieldTypeB Type k)]) => Eq (V1 w sch sty) Source # | |
(Ord (w a), (sch :/: sty) ~ 'DRecord nm '['FieldDef f2 ('TPrimitive a :: FieldTypeB Type k)]) => Ord (V1 w sch sty) Source # | |
Defined in Mu.Schema.Interpretation.Anonymous | |
(Show (w a), (sch :/: sty) ~ 'DRecord nm '['FieldDef f2 ('TPrimitive a :: FieldTypeB Type k)]) => Show (V1 w sch sty) Source # | |
data V2 w sch sty where Source #
Anonymous term for a record with two fields.
V2 :: (sch :/: sty) ~ 'DRecord nm '['FieldDef f ('TPrimitive a), 'FieldDef g ('TPrimitive b)] => w a -> w b -> V2 w sch sty |