Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data WithEncoded (fld :: Symbol) a where
- WithEncoded :: forall fld a. KnownSymbol fld => a -> WithEncoded fld a
- data With (fld :: Symbol) a where
- With :: forall fld a. KnownSymbol fld => a -> With fld a
- class FromWith f where
- fromWith :: f a -> a
- fromWith2 :: (FromWith f, FromWith g) => f (g a) -> a
- fromWith3 :: (FromWith f, FromWith g, FromWith h) => f (g (h a)) -> a
Documentation
data WithEncoded (fld :: Symbol) a where Source #
Represents a JSON value of type a
that is encoded as a string in a field fld
WithEncoded :: forall fld a. KnownSymbol fld => a -> WithEncoded fld a |
Instances
data With (fld :: Symbol) a where Source #
Represents a JSON value of type a
in a field fld
With :: forall fld a. KnownSymbol fld => a -> With fld a |
Instances
FromWith (With x) Source # | |
Defined in Antiope.Messages.Types | |
Eq a => Eq (With fld a) Source # | |
Ord a => Ord (With fld a) Source # | |
Show a => Show (With fld a) Source # | |
(KnownSymbol fld, ToJSON a) => ToJSON (With fld a) Source # | |
Defined in Antiope.Messages.Types | |
(KnownSymbol fld, FromJSON a) => FromJSON (With fld a) Source # | |
class FromWith f where Source #
Extracts value from With
and WithEncoded
wrappers
:: f a | |
-> a | Extracts value from |
Instances
FromWith (With x) Source # | |
Defined in Antiope.Messages.Types | |
FromWith (WithEncoded x) Source # | |
Defined in Antiope.Messages.Types fromWith :: WithEncoded x a -> a Source # |