Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- newtype Decoder a = Decoder {}
- decoderOf :: forall a b. (ApplyVariadic Decoder a b, Typeable a, Typeable b) => a -> Typed b
- addDecoder :: forall a. Typeable a => (Text -> Either Text a) -> Typed (Decoder a)
- intDecoder :: Text -> Either Text Int
- boolDecoder :: Text -> Either Text Bool
- textDecoder :: Text -> Either Text Text
- stringDecoder :: Text -> Either Text String
- manyOf :: forall a. Typeable a => Typed (Decoder a -> Decoder [a])
- decodeMany :: forall a. Typeable a => Decoder a -> Decoder [a]
- decodeManySeparated :: forall a. Typeable a => Text -> Decoder a -> Decoder [a]
Documentation
Decode a value of type a from Text
decoderOf :: forall a b. (ApplyVariadic Decoder a b, Typeable a, Typeable b) => a -> Typed b Source #
Create a Decoder a for a given constructor of type a
addDecoder :: forall a. Typeable a => (Text -> Either Text a) -> Typed (Decoder a) Source #
Add a Decoder to a registry