Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype Get s a = Get {}
- type family GetState s
- data GetEnv s = GetEnv {
- geBuf :: !(ForeignPtr Word8)
- geBegin :: Addr#
- geEnd :: Addr#
- geReinterpretCast :: Addr#
- data GetException
- offset :: Get s Int
- failGet :: (Int -> String -> GetException) -> String -> Get s a
- stateGet :: Get s (GetState s)
- setStateGet :: GetState s -> Get s ()
- runGet :: Get s a -> GetState s -> ByteString -> Either String a
- newtype Put s a = Put {}
- type family PutState s
- data PutEnv s = PutEnv {}
- data Chunk = Chunk {}
- evalPut :: Put s a -> PutState s -> (a, ByteString)
- grow :: Int -> Put s ()
- statePut :: Put s (PutState s)
- setStatePut :: PutState s -> Put s ()
The Get type
GetEnv | |
|
data GetException Source #
LengthException Int String | |
CharException Int String | |
EOFException Int String | |
GenericGetException Int String |
Instances
Eq GetException Source # | |
Defined in Data.PersistState.Internal (==) :: GetException -> GetException -> Bool # (/=) :: GetException -> GetException -> Bool # | |
Show GetException Source # | |
Defined in Data.PersistState.Internal showsPrec :: Int -> GetException -> ShowS # show :: GetException -> String # showList :: [GetException] -> ShowS # | |
Exception GetException Source # | |
Defined in Data.PersistState.Internal |
setStateGet :: GetState s -> Get s () Source #
runGet :: Get s a -> GetState s -> ByteString -> Either String a Source #
Run the Get monad applies a get
-based parser on the input ByteString
The Put type
setStatePut :: PutState s -> Put s () Source #