h2jvm
Safe HaskellNone
LanguageGHC2021

JVM.Data.Abstract.Builder.Code

Synopsis

Documentation

data CodeBuilder (m :: k) a where Source #

Constructors

AddCodeAttribute :: forall {k} (m :: k). CodeAttribute -> CodeBuilder m () 
NewLabel :: forall {k} (m :: k). CodeBuilder m Label 
Emit' :: forall {k} (m :: k). [Instruction] -> CodeBuilder m () 
GetCode :: forall {k} (m :: k). CodeBuilder m [Instruction] 

Instances

Instances details
type DispatchOf (CodeBuilder :: (Type -> Type) -> Type -> Type) Source # 
Instance details

Defined in JVM.Data.Abstract.Builder.Code

type DispatchOf (CodeBuilder :: (Type -> Type) -> Type -> Type) = 'Dynamic

addCodeAttribute :: forall {k} (es :: [Effect]). (HasCallStack, (CodeBuilder :: (Type -> Type) -> Type -> Type) :> es) => CodeAttribute -> Eff es () Source #

Perform the operation AddCodeAttribute.

emit' :: forall {k} (es :: [Effect]). (HasCallStack, (CodeBuilder :: (Type -> Type) -> Type -> Type) :> es) => [Instruction] -> Eff es () Source #

Perform the operation Emit'.

getCode :: forall {k} (es :: [Effect]). (HasCallStack, (CodeBuilder :: (Type -> Type) -> Type -> Type) :> es) => Eff es [Instruction] Source #

Perform the operation GetCode.

newLabel :: forall {k} (es :: [Effect]). (HasCallStack, (CodeBuilder :: (Type -> Type) -> Type -> Type) :> es) => Eff es Label Source #

Perform the operation NewLabel.

emit :: forall (r :: [Effect]). (CodeBuilder :: (Type -> Type) -> Type -> Type) :> r => Instruction -> Eff r () Source #

codeBuilderToState :: forall (r :: [Effect]) a. State CodeState :> r => Eff ((CodeBuilder :: (Type -> Type) -> Type -> Type) ': r) a -> Eff r a Source #

runCodeBuilder :: forall (r :: [(Type -> Type) -> Type -> Type]) a. Eff ((CodeBuilder :: (Type -> Type) -> Type -> Type) ': r) a -> Eff r (a, [CodeAttribute], [Instruction]) Source #