Module
Data.CBOR
- Package
- purescript-cbor-stream
- Repository
- cakekindel/purescript-cbor-stream
#WriteCBOR Source
class WriteCBOR a where
Members
Instances
WriteCBOR Foreign
(RowToList r rl, WriteCBORFields rl r () to) => WriteCBOR (Record r)
WriteCBOR BigInt
WriteCBOR JSDate
WriteCBOR DateTime
(WriteCBOR k, WriteCBOR v) => WriteCBOR (Map k v)
(WriteCBOR a) => WriteCBOR (Array a)
(Foldable f, WriteCBOR a) => WriteCBOR (f a)
(EncodeKey k, WriteCBOR k, WriteCBOR v) => WriteCBOR (Map k v)
(WriteForeign a) => WriteCBOR a
#applyEither Source
applyEither :: forall e a b. Semigroup e => Either e (a -> b) -> Either e a -> Either e b
#exceptTApply Source
exceptTApply :: forall a b e m. Semigroup e => Applicative m => ExceptT e m (a -> b) -> ExceptT e m a -> ExceptT e m b
#ReadCBORFields Source
class ReadCBORFields :: RowList Type -> Row Type -> Row Type -> Constraint
class ReadCBORFields (xs :: RowList Type) (from :: Row Type) (to :: Row Type) | xs -> from to where
Members
Instances
(IsSymbol name, ReadCBOR ty, ReadCBORFields tail from from', Lacks name from', Cons name ty from' to) => ReadCBORFields (Cons name ty tail) from to
ReadCBORFields Nil () ()
#WriteCBORFields Source
class WriteCBORFields :: RowList Type -> Row Type -> Row Type -> Row Type -> Constraint
class WriteCBORFields (rl :: RowList Type) row (from :: Row Type) (to :: Row Type) | rl -> row from to where
Members
writeImplFields :: forall g. g rl -> Record row -> Builder (Record from) (Record to)
Instances
(IsSymbol name, WriteCBOR ty, WriteCBORFields tail row from from', Cons name ty whatever row, Lacks name from', Cons name Foreign from' to) => WriteCBORFields (Cons name ty tail) row from to
WriteCBORFields Nil row () ()