Maintainer | maurerl@cs.uoregon.edu |
---|---|
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Translation between Sequent Core and native GHC Core.
- fromCoreExpr :: Expr b -> Command b
- fromCoreBind :: Bind b -> Bind b
- fromCoreBinds :: [Bind b] -> [Bind b]
- fromCoreAlt :: Alt b -> Alt b
- commandToCoreExpr :: SeqCoreCommand -> CoreExpr
- valueToCoreExpr :: SeqCoreValue -> CoreExpr
- frameToCoreExpr :: SeqCoreFrame -> CoreExpr -> CoreExpr
- bindToCore :: SeqCoreBind -> CoreBind
- bindsToCore :: [SeqCoreBind] -> [CoreBind]
- altToCore :: SeqCoreAlt -> CoreAlt
Documentation
The translations to and from Sequent Core are not guaranteed to be perfect
inverses. However, any differences between e
and commandToCoreExpr
(fromCoreExpr e)
should be operationally insignificant, such as a let
floating out from a function being applied. A more precise characterization
of the indended invariants of these functions would entail some sort of
bisimulation, but it should suffice to know that the translations are
"faithful enough."
fromCoreExpr :: Expr b -> Command b Source
Translates a Core expression into Sequent Core.
fromCoreBind :: Bind b -> Bind b Source
Translates a Core binding into Sequent Core.
fromCoreBinds :: [Bind b] -> [Bind b] Source
Translates a list of Core bindings into Sequent Core.
fromCoreAlt :: Alt b -> Alt b Source
Translates a Core case alternative into Sequent Core.
commandToCoreExpr :: SeqCoreCommand -> CoreExpr Source
Translates a command into Core.
valueToCoreExpr :: SeqCoreValue -> CoreExpr Source
Translates a value into Core.
frameToCoreExpr :: SeqCoreFrame -> CoreExpr -> CoreExpr Source
Translates a frame into a function that will wrap a Core expression with a fragment of context (an argument to apply to, a case expression to run, etc.).
bindToCore :: SeqCoreBind -> CoreBind Source
Translates a binding into Core.
bindsToCore :: [SeqCoreBind] -> [CoreBind] Source
Translates a list of bindings into Core.
altToCore :: SeqCoreAlt -> CoreAlt Source
Translates a case alternative into Core.