Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Module
- data ValidModule
- data ValidationError
- = DuplicatedExportNames [String]
- | InvalidTableType
- | MinMoreThanMaxInMemoryLimit
- | MemoryLimitExceeded
- | AlignmentOverflow
- | MoreThanOneMemory
- | MoreThanOneTable
- | FunctionIndexOutOfRange
- | TableIndexOutOfRange Natural
- | MemoryIndexOutOfRange Natural
- | LocalIndexOutOfRange Natural
- | GlobalIndexOutOfRange Natural
- | LabelIndexOutOfRange
- | TypeIndexOutOfRange
- | ResultTypeDoesntMatch
- | TypeMismatch { }
- | InvalidResultArity
- | InvalidConstantExpr
- | InvalidStartFunctionType
- | GlobalIsImmutable
- parse :: ByteString -> Either String Module
- validate :: Module -> Either ValidationError ValidModule
- parseScript :: ByteString -> Either String Script
- encode :: Module -> ByteString
- encodeLazy :: Module -> ByteString
- decode :: ByteString -> Either String Module
- decodeLazy :: ByteString -> Either String Module
- type Script = [Command]
- data Command
- data ModuleDef
- = RawModDef (Maybe Ident) Module
- | TextModDef (Maybe Ident) Text
- | BinaryModDef (Maybe Ident) ByteString
- data Action
- data Assertion
- = AssertReturn Action [Expression]
- | AssertReturnCanonicalNaN Action
- | AssertReturnArithmeticNaN Action
- | AssertTrap (Either Action ModuleDef) FailureString
- | AssertMalformed ModuleDef FailureString
- | AssertInvalid ModuleDef FailureString
- | AssertUnlinkable ModuleDef FailureString
- | AssertExhaustion Action FailureString
- newtype Ident = Ident Text
- data Meta
- runScript :: OnAssertFail -> Script -> IO ()
- $sel:getModule:ValidModule :: ValidModule -> Module
Documentation
Instances
data ValidModule Source #
Instances
Eq ValidModule Source # | |
Defined in Language.Wasm.Validate (==) :: ValidModule -> ValidModule -> Bool # (/=) :: ValidModule -> ValidModule -> Bool # | |
Show ValidModule Source # | |
Defined in Language.Wasm.Validate showsPrec :: Int -> ValidModule -> ShowS # show :: ValidModule -> String # showList :: [ValidModule] -> ShowS # |
data ValidationError Source #
Instances
Eq ValidationError Source # | |
Defined in Language.Wasm.Validate (==) :: ValidationError -> ValidationError -> Bool # (/=) :: ValidationError -> ValidationError -> Bool # | |
Show ValidationError Source # | |
Defined in Language.Wasm.Validate showsPrec :: Int -> ValidationError -> ShowS # show :: ValidationError -> String # showList :: [ValidationError] -> ShowS # | |
Monoid ValidationResult Source # | |
Defined in Language.Wasm.Validate |
parseScript :: ByteString -> Either String Script Source #
Parse WebAssembly extended script grammar
encodeLazy :: Module -> ByteString Source #
Dump Module
to binary representation lazily
decodeLazy :: ByteString -> Either String Module Source #
Decode Module
from binary representation lazily
Instances
AssertReturn Action [Expression] | |
AssertReturnCanonicalNaN Action | |
AssertReturnArithmeticNaN Action | |
AssertTrap (Either Action ModuleDef) FailureString | |
AssertMalformed ModuleDef FailureString | |
AssertInvalid ModuleDef FailureString | |
AssertUnlinkable ModuleDef FailureString | |
AssertExhaustion Action FailureString |