| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Unison.Runtime.Serialize.Get
Synopsis
- newtype Get m a = Get {
- unGet :: ByteString -> Ix m -> m a
- data GetExn
- getExnMsg :: GetExn -> String
- class PrimMonad m => PrimBase (m :: Type -> Type) where
- newtype Ix m = Ix (PrimVar (PrimState m) Int)
- evaluated :: PrimBase m => a -> Get m a
- getByteString :: PrimBase m => Int -> Get m ByteString
- getWord8 :: PrimBase m => Get m Word8
- getVarInt :: (Bits int, Num int, Ord int, PrimBase m) => Get m int
- getInt64be :: PrimBase m => Get m Int64
- getWord16be :: PrimBase m => Get m Word16
- getWord32be :: PrimBase m => Get m Word32
- getWord64be :: PrimBase m => Get m Word64
- getWord64le :: PrimBase m => Get m Word64
- getDoublebe :: PrimBase m => Get m Double
- getFloatbe :: PrimBase m => Get m Float
- getAccumulating :: PrimBase m => s -> (s -> a -> s) -> (s -> r) -> Get m a -> Get m r
- getAccumulatingRevList :: PrimBase m => ([a] -> r) -> Get m a -> Get m r
- getArray :: PrimBase m => Get m a -> Get m (Array a)
- getList :: PrimBase m => Get m a -> Get m [a]
- getSeq :: PrimBase m => Get m a -> Get m (Seq a)
- getPrimArray :: (PrimBase m, Prim a) => Get m a -> Get m (PrimArray a)
- remaining :: PrimBase m => Get m Int
- runGet :: PrimBase m => Get m a -> ByteString -> m a
- runGetCatch :: PrimBase m => Get m a -> ByteString -> m (Either String a)
- runGetCatchIO :: Get IO a -> ByteString -> IO (Either String a)
Documentation
Constructors
| Get | |
Fields
| |
Constructors
| InsufficientBytes String | |
| UserExn String |
Instances
| Exception GetExn Source # | |
Defined in Unison.Runtime.Serialize.Get Methods toException :: GetExn -> SomeException # fromException :: SomeException -> Maybe GetExn # displayException :: GetExn -> String # | |
| Show GetExn Source # | |
class PrimMonad m => PrimBase (m :: Type -> Type) where #
Class of primitive monads for state-transformer actions.
Unlike PrimMonad, this typeclass requires that the Monad be fully
expressed as a state transformer, therefore disallowing other monad
transformers on top of the base IO or ST.
Since: primitive-0.6.0.0
Methods
internal :: m a -> State# (PrimState m) -> (# State# (PrimState m), a #) #
Expose the internal structure of the monad.
getByteString :: PrimBase m => Int -> Get m ByteString Source #
runGetCatch :: PrimBase m => Get m a -> ByteString -> m (Either String a) Source #
runGetCatchIO :: Get IO a -> ByteString -> IO (Either String a) Source #