Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
A representation where all bindings are annotated with range information.
Synopsis
- data Ranges lore
- module Futhark.IR.Prop.Ranges
- module Futhark.IR.Prop
- module Futhark.IR.Traversals
- module Futhark.IR.Pretty
- module Futhark.IR.Syntax
- addRangesToPattern :: (ASTLore lore, CanBeRanged (Op lore)) => Pattern lore -> Exp (Ranges lore) -> Pattern (Ranges lore)
- mkRangedBody :: BodyDec lore -> Stms (Ranges lore) -> Result -> Body (Ranges lore)
- mkPatternRanges :: (ASTLore lore, CanBeRanged (Op lore)) => Pattern lore -> Exp (Ranges lore) -> ([PatElemT (Range, LetDec lore)], [PatElemT (Range, LetDec lore)])
- mkBodyRanges :: Stms lore -> Result -> [Range]
- removeProgRanges :: CanBeRanged (Op lore) => Prog (Ranges lore) -> Prog lore
- removeStmRanges :: CanBeRanged (Op lore) => Stm (Ranges lore) -> Stm lore
- removeLambdaRanges :: CanBeRanged (Op lore) => Lambda (Ranges lore) -> Lambda lore
The Lore definition
The lore for the basic representation.
Instances
module Futhark.IR.Prop.Ranges
Module re-exports
module Futhark.IR.Prop
module Futhark.IR.Traversals
module Futhark.IR.Pretty
module Futhark.IR.Syntax
Adding ranges
addRangesToPattern :: (ASTLore lore, CanBeRanged (Op lore)) => Pattern lore -> Exp (Ranges lore) -> Pattern (Ranges lore) Source #
Add ranges to the pattern corresponding to this expression.
mkRangedBody :: BodyDec lore -> Stms (Ranges lore) -> Result -> Body (Ranges lore) Source #
Construct a body with the Ranges
lore.
mkPatternRanges :: (ASTLore lore, CanBeRanged (Op lore)) => Pattern lore -> Exp (Ranges lore) -> ([PatElemT (Range, LetDec lore)], [PatElemT (Range, LetDec lore)]) Source #
Find the ranges for the pattern elements.
Removing ranges
removeProgRanges :: CanBeRanged (Op lore) => Prog (Ranges lore) -> Prog lore Source #
Remove range information from program.
removeStmRanges :: CanBeRanged (Op lore) => Stm (Ranges lore) -> Stm lore Source #
Remove range information from statement.
removeLambdaRanges :: CanBeRanged (Op lore) => Lambda (Ranges lore) -> Lambda lore Source #
Remove range information from lambda.