License | BSD-3-Clause |
---|---|
Maintainer | Jamie Willis |
Stability | experimental |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
This module contains the infrastructure and definitions of defunctionalised terms used solely within the machine.
Since: 1.0.0.0
Synopsis
- data Defunc a where
- user :: Defunc a -> Defunc a
- ap :: (?flags :: Flags) => Defunc (a -> b) -> Defunc a -> Defunc b
- ap2 :: (?flags :: Flags) => Defunc (a -> b -> c) -> Defunc a -> Defunc b -> Defunc c
- _if :: (?flags :: Flags) => Defunc Bool -> Code a -> Code a -> Code a
- genDefunc :: (?flags :: Flags) => Defunc a -> Code a
- pattern NormLam :: (?flags :: Flags) => Lam a -> Defunc a
- pattern FREEVAR :: (?flags :: Flags) => Code a -> Defunc a
Documentation
Machine level defunctionalisation, for terms that can only be introduced by the code generator, and that do not require value level representations.
Since: 1.4.0.0
LAM :: Lam a -> Defunc a | Wraps Since: 1.1.0.0 |
BOTTOM :: Defunc a | Represents Haskell's Since: 1.0.0.0 |
INPUT :: Input o -> Defunc o | Allows the static Since: 1.8.0.0 |
user :: Defunc a -> Defunc a Source #
Promotes a Defunc
value from the Frontend API into a Backend one.
Since: 1.1.0.0
ap :: (?flags :: Flags) => Defunc (a -> b) -> Defunc a -> Defunc b Source #
Applies a function to a value when both are Defunc
.
Since: 1.3.0.0
ap2 :: (?flags :: Flags) => Defunc (a -> b -> c) -> Defunc a -> Defunc b -> Defunc c Source #
Applies a function to two values when all are Defunc
.
Since: 1.3.0.0
_if :: (?flags :: Flags) => Defunc Bool -> Code a -> Code a -> Code a Source #
Acts as an if
-expression lifted to the Defunc
level.
Since: 1.3.0.0
genDefunc :: (?flags :: Flags) => Defunc a -> Code a Source #
Generate the Haskell code that represents this defunctionalised value.
Since: 1.0.0.0