Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Field s o a
- type Fields s o = Field s o o
- field :: Text -> s a -> Getter o a -> Field s o a
- optional :: Text -> s a -> Getter o (Maybe a) -> Field s o (Maybe a)
- alt :: Text -> s b -> Prism' a b -> AltDef s a
- data Schema p a
- class HasSchema a where
- type PrimitivesOf a :: * -> *
- getSchema :: Schema (PrimitivesOf a) a
- prim :: p a -> Schema p a
- const :: a -> Schema p a
- record :: Fields (Schema p) a -> Schema p a
- asList :: Iso' (Vector a) [a]
- toList :: Schema p (Vector a) -> Schema p [a]
- oneOf :: [AltDef (Schema p) a] -> Schema p a
- alias :: Iso' a b -> Schema p a -> Schema p b
Documentation
The type of a field of type a
, belonging to the data type o
and based on schema s
Instances
Profunctor (Field s) Source # | |
Defined in Data.Schema.Internal.Types | |
Functor (Field s o) Source # | |
Applicative (Field s o) Source # | |
The Schema type itself for a set of primitives p
class HasSchema a where Source #
type PrimitivesOf a :: * -> * Source #
getSchema :: Schema (PrimitivesOf a) a Source #
record :: Fields (Schema p) a -> Schema p a Source #
Define the schema of record using the given fields