Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
type Constructor a = forall fields b. (fields ~ FieldsOf a, FSubset fields b (FImage fields b)) => Rec (Tagged fields :. FieldRepr) b -> JsonRepr (SchemaObject fields) Source #
withRepr :: Constructor a Source #
class Representable s where Source #
Instances
type family FieldsOf (s :: Schema) :: [(Symbol, Schema)] where ... Source #
FieldsOf (SchemaObject fs) = fs |
type FieldConstructor fn = forall byField fs. (byField ~ ByField fn fs (FIndex fn fs), Representable byField) => Repr byField -> (Tagged fs :. FieldRepr) '(fn, byField) Source #
field :: forall fn. KnownSymbol fn => FieldConstructor fn Source #
type family Repr (s :: Schema) = (ty :: Type) where ... Source #
Repr (SchemaObject so) = Rec FieldRepr so | |
Repr (SchemaArray cs sa) = Vector (JsonRepr sa) | |
Repr (SchemaText cs) = Text | |
Repr (SchemaNumber cs) = Scientific | |
Repr SchemaBoolean = Bool | |
Repr (SchemaOptional so) = Maybe (JsonRepr so) | |
Repr (SchemaUnion (h ': tl)) = Union JsonRepr (h ': tl) |