| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
JVM.Data.Abstract.Builder.Code
Synopsis
- data CodeBuilder (m :: k) a where
- 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]
- addCodeAttribute :: forall {k} (es :: [Effect]). (HasCallStack, (CodeBuilder :: (Type -> Type) -> Type -> Type) :> es) => CodeAttribute -> Eff es ()
- emit' :: forall {k} (es :: [Effect]). (HasCallStack, (CodeBuilder :: (Type -> Type) -> Type -> Type) :> es) => [Instruction] -> Eff es ()
- getCode :: forall {k} (es :: [Effect]). (HasCallStack, (CodeBuilder :: (Type -> Type) -> Type -> Type) :> es) => Eff es [Instruction]
- newLabel :: forall {k} (es :: [Effect]). (HasCallStack, (CodeBuilder :: (Type -> Type) -> Type -> Type) :> es) => Eff es Label
- data CodeState = CodeState {}
- initialCodeState :: CodeState
- emit :: forall (r :: [Effect]). (CodeBuilder :: (Type -> Type) -> Type -> Type) :> r => Instruction -> Eff r ()
- codeBuilderToState :: forall (r :: [Effect]) a. State CodeState :> r => Eff ((CodeBuilder :: (Type -> Type) -> Type -> Type) ': r) a -> Eff r a
- runCodeBuilder :: forall (r :: [(Type -> Type) -> Type -> Type]) a. Eff ((CodeBuilder :: (Type -> Type) -> Type -> Type) ': r) a -> Eff r (a, [CodeAttribute], [Instruction])
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
| type DispatchOf (CodeBuilder :: (Type -> Type) -> Type -> Type) Source # | |
Defined in JVM.Data.Abstract.Builder.Code | |
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.
Constructors
| CodeState | |
Fields
| |
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 #