Safe Haskell | None |
---|---|
Language | Haskell2010 |
Defines reusable abstractions for testing Roundtrip properties of CBOR instances
Synopsis
- roundTrip :: ( ToCBOR t, FromCBOR t) => t -> RoundTripResult t
- roundTrip' :: (t -> Encoding ) -> ( forall s. Decoder s t) -> t -> RoundTripResult t
- embedTrip :: ( ToCBOR t, FromCBOR s) => t -> RoundTripResult s
- embedTrip' :: (s -> Encoding ) -> ( forall x. Decoder x t) -> s -> RoundTripResult t
- roundTripAnn :: ( ToCBOR t, FromCBOR ( Annotator t)) => t -> RoundTripResult t
- embedTripAnn :: forall s t. ( ToCBOR t, FromCBOR ( Annotator s)) => t -> RoundTripResult s
- type RoundTripResult t = Either DeserialiseFailure ( ByteString , t)
Documentation
roundTrip' :: (t -> Encoding ) -> ( forall s. Decoder s t) -> t -> RoundTripResult t Source #
embedTrip :: ( ToCBOR t, FromCBOR s) => t -> RoundTripResult s Source #
Can we serialise a type, and then deserialise it as something else?
embedTrip' :: (s -> Encoding ) -> ( forall x. Decoder x t) -> s -> RoundTripResult t Source #
roundTripAnn :: ( ToCBOR t, FromCBOR ( Annotator t)) => t -> RoundTripResult t Source #
embedTripAnn :: forall s t. ( ToCBOR t, FromCBOR ( Annotator s)) => t -> RoundTripResult s Source #
type RoundTripResult t = Either DeserialiseFailure ( ByteString , t) Source #