codec-0.1: First-class record construction and bidirectional serialization

Safe HaskellNone
LanguageHaskell2010

Data.Codec.Testing

Contents

Synopsis

Testing

class ParseResult f where

Methods

toEither :: f a -> Either String a

roundTrip :: ParseResult f => ConcreteCodec c f a -> a -> Either String a

Round-trip a value through a ConcreteCodec to an `Either String a`.

roundTripStorable :: Storable a => a -> IO a

Round-trip a value through its Storable instance.