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 | Haskell2010 |
Synopsis
- data ExprCtx
- initExprCtx :: Id -> ExprCtx
- ctxAssertEvaluated :: Id -> ExprCtx -> ExprCtx
- ctxIsEvaluated :: ExprCtx -> Id -> Bool
- ctxSetSrcSpan :: RealSrcSpan -> ExprCtx -> ExprCtx
- ctxSrcSpan :: ExprCtx -> Maybe RealSrcSpan
- ctxSetTop :: Id -> ExprCtx -> ExprCtx
- ctxTarget :: ExprCtx -> [TypedExpr]
- ctxSetTarget :: [TypedExpr] -> ExprCtx -> ExprCtx
- ctxEvaluatedIds :: ExprCtx -> UniqSet Id
- 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
initExprCtx :: Id -> ExprCtx Source #
Initialize an expression context in the context of the given top-level binding Id
ctxIsEvaluated :: ExprCtx -> 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
ctxEvaluatedIds :: ExprCtx -> UniqSet Id Source #
Ids that we know to be evaluated (e.g. case binders when the expression to evaluate is in an alternative)
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