Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Morley.Michelson.Interpret.Unpack
Description
Module, carrying logic of UNPACK
instruction.
This is nearly symmetric to adjacent Pack.hs module.
When implementing this the following sources were used:
Synopsis
- newtype UnpackError = UnpackError {}
- unpackInstr' :: ByteString -> Either UnpackError [ExpandedOp]
- unpackUValue' :: ByteString -> Either UnpackError Value
- unpackValue' :: forall t. UnpackedValScope t => ByteString -> Either UnpackError (Value t)
Documentation
newtype UnpackError Source #
Any decoding error.
Constructors
UnpackError | |
Fields |
Instances
Exception UnpackError Source # | |
Defined in Morley.Util.Binary Methods toException :: UnpackError -> SomeException # fromException :: SomeException -> Maybe UnpackError # displayException :: UnpackError -> String # | |
Show UnpackError Source # | |
Defined in Morley.Util.Binary Methods showsPrec :: Int -> UnpackError -> ShowS # show :: UnpackError -> String # showList :: [UnpackError] -> ShowS # | |
Eq UnpackError Source # | |
Defined in Morley.Util.Binary | |
Buildable UnpackError Source # | |
Defined in Morley.Util.Binary |
unpackInstr' :: ByteString -> Either UnpackError [ExpandedOp] Source #
Deserialize an instruction into the given value.
unpackUValue' :: ByteString -> Either UnpackError Value Source #
Deserialize bytes into Value
.
unpackValue' :: forall t. UnpackedValScope t => ByteString -> Either UnpackError (Value t) Source #
Deserialize bytes into the given value.
Suitable for UNPACK
operation only.