Copyright | (c) The University of Glasgow 2001 |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Jeffrey Young <jeffrey.young@iohk.io> Luite Stegeman <luite.stegeman@iohk.io> Sylvain Henry <sylvain.henry@iohk.io> Josh Meredith <josh.meredith@iohk.io> |
Stability | experimental |
Safe Haskell | None |
Language | GHC2021 |
Synopsis
- data ExprCtx
- initExprCtx :: Id -> ExprCtx
- ctxIsEvaluated :: Id -> Bool
- ctxSetSrcSpan :: RealSrcSpan -> ExprCtx -> ExprCtx
- ctxSrcSpan :: ExprCtx -> Maybe RealSrcSpan
- ctxSetTop :: Id -> ExprCtx -> ExprCtx
- ctxTarget :: ExprCtx -> [TypedExpr]
- ctxSetTarget :: [TypedExpr] -> ExprCtx -> ExprCtx
- ctxClearLneFrame :: ExprCtx -> ExprCtx
- ctxUpdateLneFrame :: [(Id, Int)] -> [Id] -> ExprCtx -> ExprCtx
- ctxLneFrameVars :: ExprCtx -> [(Id, Int)]
- ctxLneFrameSize :: ExprCtx -> Int
- ctxIsLneBinding :: ExprCtx -> Id -> Bool
- ctxIsLneLiveVar :: ExprCtx -> Id -> Bool
- ctxLneBindingStackSize :: ExprCtx -> Id -> Maybe Int
- ctxLneShrinkStack :: ExprCtx -> Int -> ExprCtx
Documentation
Context into which an expression is evaluated
Instances
initExprCtx :: Id -> ExprCtx Source #
Initialize an expression context in the context of the given top-level binding Id
ctxIsEvaluated :: Id -> Bool Source #
Predicate: do we know for sure that the given Id is evaluated?
ctxSetSrcSpan :: RealSrcSpan -> ExprCtx -> ExprCtx Source #
Set source location
ctxSrcSpan :: ExprCtx -> Maybe RealSrcSpan Source #
Source location
Let-no-escape
ctxClearLneFrame :: ExprCtx -> ExprCtx Source #
Remove information about the current LNE frame
ctxLneFrameVars :: ExprCtx -> [(Id, Int)] Source #
Contents of current LNE frame
Variables and their index on the stack
ctxLneFrameSize :: ExprCtx -> Int Source #
Cache the length of ctxLneFrameVars
ctxIsLneLiveVar :: ExprCtx -> Id -> Bool Source #
Does the given Id correspond to a LNE live var on the stack