Safe Haskell | None |
---|---|
Language | Haskell2010 |
Data.PersistState.Internal
Contents
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
Constructors
GetEnv | |
Fields
|
data GetException Source #
Constructors
LengthException Int String | |
CharException Int String | |
EOFException Int String | |
GenericGetException Int String |
Instances
Eq GetException Source # | |
Defined in Data.PersistState.Internal | |
Show GetException Source # | |
Defined in Data.PersistState.Internal Methods showsPrec :: Int -> GetException -> ShowS # show :: GetException -> String # showList :: [GetException] -> ShowS # | |
Exception GetException Source # | |
Defined in Data.PersistState.Internal Methods toException :: GetException -> SomeException # fromException :: SomeException -> Maybe GetException # displayException :: GetException -> String # |
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
Constructors
Put | |
setStatePut :: PutState s -> Put s () Source #