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

Safe HaskellNone
LanguageHaskell2010

Data.Flat.Decoder.Types

Description

Strict Decoder Types

Synopsis

Documentation

newtype Get a Source #

Decoder monad

Constructors

Get 

Fields

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 -> () #

data S Source #

Decoder state

Constructors

S 

Fields

Instances

Eq S Source # 

Methods

(==) :: S -> S -> Bool #

(/=) :: S -> S -> Bool #

Ord S Source # 

Methods

compare :: S -> S -> Ordering #

(<) :: S -> S -> Bool #

(<=) :: S -> S -> Bool #

(>) :: S -> S -> Bool #

(>=) :: S -> S -> Bool #

max :: S -> S -> S #

min :: S -> S -> S #

Show S Source # 

Methods

showsPrec :: Int -> S -> ShowS #

show :: S -> String #

showList :: [S] -> ShowS #

data GetResult a Source #

Constructors

GetResult !S !a 

Instances

Functor GetResult Source # 

Methods

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

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

type Decoded a = Either DecodeException a Source #

A decoded value