| Copyright | (c) 2026 Tushar Adhatrao |
|---|---|
| License | MIT |
| Stability | stable |
| Safe Haskell | None |
| Language | GHC2021 |
WasmEdge.Tag
Description
Supports the WebAssembly Exception Handling proposal (WasmEdge 0.18+):
TagType— describes the signature (parameter types) associated with an exception tagTagInstance— a runtime tag instance retrieved from a module instance
Synopsis
- newtype TagType = TagType (BorrowedCtx TagTypeTag)
- getTagTypeFunctionType :: TagType -> IO FunctionType
- newtype TagInstance = TagInstance (BorrowedCtx TagInstanceTag)
- getTagInstanceType :: TagInstance -> IO TagType
- borrowTagType :: Ptr TagTypeTag -> IO TagType
- borrowTagInstance :: Ptr TagInstanceTag -> IO TagInstance
- unsafeTagTypePtr :: TagType -> Ptr TagTypeTag
- unsafeTagInstancePtr :: TagInstance -> Ptr TagInstanceTag
Tag type
A WebAssembly tag type describing the parameter types of an exception tag. Tag types are owned by the module / runtime and accessed via borrowed reference.
Constructors
| TagType (BorrowedCtx TagTypeTag) |
getTagTypeFunctionType :: TagType -> IO FunctionType #
Retrieve the underlying FunctionType describing this tag's payload types.
Tag instance
newtype TagInstance #
A runtime WebAssembly tag instance.
Constructors
| TagInstance (BorrowedCtx TagInstanceTag) |
Instances
| Eq TagInstance # | |
Defined in WasmEdge.Tag | |
getTagInstanceType :: TagInstance -> IO TagType #
Get the TagType of a TagInstance.
Internal helpers
borrowTagType :: Ptr TagTypeTag -> IO TagType #
Construct a borrowed TagType from a raw pointer.
borrowTagInstance :: Ptr TagInstanceTag -> IO TagInstance #
Construct a borrowed TagInstance from a raw pointer.
unsafeTagTypePtr :: TagType -> Ptr TagTypeTag #
Extract the raw pointer from a TagType.
unsafeTagInstancePtr :: TagInstance -> Ptr TagInstanceTag #
Extract the raw pointer from a TagInstance.