| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
H2JVM.Internal.Convert.Monad
Description
General effect stack for all high level -> low level conversion operations.
Synopsis
- type ConvertEff (r :: [Effect]) = (State ConstantPoolState :> r, Error CodeConverterError :> r)
- runConvertM :: forall (r :: [(Type -> Type) -> Type -> Type]) a. Eff (State ConstantPoolState ': (Error CodeConverterError ': r)) a -> Eff r (Either CodeConverterError (a, ConstantPoolState))
- data CodeConverterError
Documentation
type ConvertEff (r :: [Effect]) = (State ConstantPoolState :> r, Error CodeConverterError :> r) Source #
A converter needs access to the ConstantPool and the ability to throw CodeConverterErrors.
runConvertM :: forall (r :: [(Type -> Type) -> Type -> Type]) a. Eff (State ConstantPoolState ': (Error CodeConverterError ': r)) a -> Eff r (Either CodeConverterError (a, ConstantPoolState)) Source #
Run a ConvertEff as a pure State & Either effect.
data CodeConverterError Source #
Errors that may be thrown during code conversion.
Constructors
| DuplicateLabel | A |
| UnmarkedLabel Label | A |
| UnsupportedAttribute String | the attribute in question is not yet supported. This error will be removed at some point -- unsupported attributes will simply not be defined if they are unsupported :) |
| ConstantPoolOverflow | the constant pool has too many attributes, more than the JVM limit of 65,536 |
| NoValidInstructions | none of the given instructions could be converted into any concrete result, e.g. they are all |
Fields
| |
Instances
| Show CodeConverterError Source # | |
Defined in H2JVM.Internal.Convert.Error Methods showsPrec :: Int -> CodeConverterError -> ShowS # show :: CodeConverterError -> String # showList :: [CodeConverterError] -> ShowS # | |