flat-0.3.2: Principled and efficient bit-oriented binary serialization.

Safe HaskellNone
LanguageHaskell2010

Data.Flat

Synopsis

Documentation

newtype UTF8Text Source #

A wrapper to encode/decode Text as UTF8 (slower but more compact)

Constructors

UTF8Text Text 

newtype UTF16Text Source #

A wrapper to encode/decode Text as UTF16 (faster but bigger)

Constructors

UTF16Text Text 

data Get a Source #

Decoder monad

Instances

Monad Get Source # 

Methods

(>>=) :: Get a -> (a -> Get b) -> Get b #

(>>) :: Get a -> Get b -> Get b #

return :: a -> Get a #

fail :: String -> Get a #

Functor Get Source # 

Methods

fmap :: (a -> b) -> Get a -> Get b #

(<$) :: a -> Get b -> Get a #

Applicative Get Source # 

Methods

pure :: a -> Get a #

(<*>) :: Get (a -> b) -> Get a -> Get b #

liftA2 :: (a -> b -> c) -> Get a -> Get b -> Get c #

(*>) :: Get a -> Get b -> Get b #

(<*) :: Get a -> Get b -> Get a #

Show (Get a) Source # 

Methods

showsPrec :: Int -> Get a -> ShowS #

show :: Get a -> String #

showList :: [Get a] -> ShowS #

NFData (Get a) Source # 

Methods

rnf :: Get a -> () #

type Decoded a = Either DecodeException a Source #

A decoded value