futhark-0.9.1: An optimising compiler for a functional, array-oriented language.

Safe HaskellNone
LanguageHaskell2010

Futhark.Transform.Substitute

Description

This module contains facilities for replacing variable names in syntactic constructs.

Synopsis

Documentation

type Substitutions = Map VName VName Source #

The substitutions to be made are given by a mapping from names to names.

class Substitute a where Source #

A type that is an instance of this class supports substitution of any names contained within.

Methods

substituteNames :: Map VName VName -> a -> a Source #

substituteNames m e replaces the variable names in e with new names, based on the mapping in m. It is assumed that all names in e are unique, i.e. there is no shadowing.

Instances
Substitute Bool Source # 
Instance details

Defined in Futhark.Transform.Substitute

Substitute () Source # 
Instance details

Defined in Futhark.Transform.Substitute

Methods

substituteNames :: Map VName VName -> () -> () Source #

Substitute VName Source # 
Instance details

Defined in Futhark.Transform.Substitute

Substitute Names Source # 
Instance details

Defined in Futhark.Transform.Substitute

Substitute SubExp Source # 
Instance details

Defined in Futhark.Transform.Substitute

Substitute Certificates Source # 
Instance details

Defined in Futhark.Transform.Substitute

Substitute Ident Source # 
Instance details

Defined in Futhark.Transform.Substitute

Substitute Rank Source # 
Instance details

Defined in Futhark.Transform.Substitute

Substitute UsageTable Source # 
Instance details

Defined in Futhark.Analysis.UsageTable

Substitute ScalExp Source # 
Instance details

Defined in Futhark.Analysis.ScalExp

Substitute KnownBound Source # 
Instance details

Defined in Futhark.Representation.AST.Attributes.Ranges

Substitute Names' Source # 
Instance details

Defined in Futhark.Representation.Aliases

Substitute ExpWisdom Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Lore

Substitute VarWisdom Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Lore

Substitute CombineSpace Source # 
Instance details

Defined in Futhark.Representation.Kernels.KernelExp

Substitute SplitOrdering Source # 
Instance details

Defined in Futhark.Representation.Kernels.KernelExp

Substitute WhichThreads Source # 
Instance details

Defined in Futhark.Representation.Kernels.Kernel

Substitute KernelResult Source # 
Instance details

Defined in Futhark.Representation.Kernels.Kernel

Substitute SpaceStructure Source # 
Instance details

Defined in Futhark.Representation.Kernels.Kernel

Substitute KernelSpace Source # 
Instance details

Defined in Futhark.Representation.Kernels.Kernel

Substitute MemReturn Source # 
Instance details

Defined in Futhark.Representation.ExplicitMemory

Substitute MemBind Source # 
Instance details

Defined in Futhark.Representation.ExplicitMemory

Substitute Input Source # 
Instance details

Defined in Futhark.Analysis.HORepresentation.SOAC

Substitute ArrayTransforms Source # 
Instance details

Defined in Futhark.Analysis.HORepresentation.SOAC

Substitute ArrayTransform Source # 
Instance details

Defined in Futhark.Analysis.HORepresentation.SOAC

Substitute a => Substitute [a] Source # 
Instance details

Defined in Futhark.Transform.Substitute

Methods

substituteNames :: Map VName VName -> [a] -> [a] Source #

Substitute a => Substitute (Maybe a) Source # 
Instance details

Defined in Futhark.Transform.Substitute

Substitute attr => Substitute (PatElemT attr) Source # 
Instance details

Defined in Futhark.Transform.Substitute

Substitute d => Substitute (DimIndex d) Source # 
Instance details

Defined in Futhark.Transform.Substitute

Substitute attr => Substitute (ParamT attr) Source # 
Instance details

Defined in Futhark.Transform.Substitute

Methods

substituteNames :: Map VName VName -> ParamT attr -> ParamT attr Source #

Substitute d => Substitute (Ext d) Source # 
Instance details

Defined in Futhark.Transform.Substitute

Substitute d => Substitute (ShapeBase d) Source # 
Instance details

Defined in Futhark.Transform.Substitute

Substitutable lore => Substitute (Lambda lore) Source # 
Instance details

Defined in Futhark.Transform.Substitute

Methods

substituteNames :: Map VName VName -> Lambda lore -> Lambda lore Source #

Substitutable lore => Substitute (Exp lore) Source # 
Instance details

Defined in Futhark.Transform.Substitute

Methods

substituteNames :: Map VName VName -> Exp lore -> Exp lore Source #

Substitute d => Substitute (DimChange d) Source # 
Instance details

Defined in Futhark.Transform.Substitute

Substitutable lore => Substitute (Body lore) Source # 
Instance details

Defined in Futhark.Transform.Substitute

Methods

substituteNames :: Map VName VName -> Body lore -> Body lore Source #

Substitute (Stm lore) => Substitute (Stms lore) Source # 
Instance details

Defined in Futhark.Transform.Substitute

Methods

substituteNames :: Map VName VName -> Stms lore -> Stms lore Source #

Substitutable lore => Substitute (Stm lore) Source # 
Instance details

Defined in Futhark.Transform.Substitute

Methods

substituteNames :: Map VName VName -> Stm lore -> Stm lore Source #

Substitute attr => Substitute (StmAux attr) Source # 
Instance details

Defined in Futhark.Transform.Substitute

Methods

substituteNames :: Map VName VName -> StmAux attr -> StmAux attr Source #

Substitute attr => Substitute (PatternT attr) Source # 
Instance details

Defined in Futhark.Transform.Substitute

Substitutable lore => Substitute (NameInfo lore) Source # 
Instance details

Defined in Futhark.Transform.Substitute

Substitute v => Substitute (PrimExp v) Source # 
Instance details

Defined in Futhark.Transform.Substitute

Substitute num => Substitute (IxFun num) Source # 
Instance details

Defined in Futhark.Representation.ExplicitMemory.Lmad

Methods

substituteNames :: Map VName VName -> IxFun num -> IxFun num Source #

Substitute num => Substitute (IxFun num) Source # 
Instance details

Defined in Futhark.Representation.ExplicitMemory.IndexFunction

Methods

substituteNames :: Map VName VName -> IxFun num -> IxFun num Source #

Attributes lore => Substitute (SOAC lore) Source # 
Instance details

Defined in Futhark.Representation.SOACS.SOAC

Methods

substituteNames :: Map VName VName -> SOAC lore -> SOAC lore Source #

Attributes lore => Substitute (GroupStreamLambda lore) Source # 
Instance details

Defined in Futhark.Representation.Kernels.KernelExp

Attributes lore => Substitute (KernelExp lore) Source # 
Instance details

Defined in Futhark.Representation.Kernels.KernelExp

Attributes lore => Substitute (KernelBody lore) Source # 
Instance details

Defined in Futhark.Representation.Kernels.Kernel

Attributes lore => Substitute (Kernel lore) Source # 
Instance details

Defined in Futhark.Representation.Kernels.Kernel

Methods

substituteNames :: Map VName VName -> Kernel lore -> Kernel lore Source #

Substitute inner => Substitute (MemOp inner) Source # 
Instance details

Defined in Futhark.Representation.ExplicitMemory

Methods

substituteNames :: Map VName VName -> MemOp inner -> MemOp inner Source #

(Substitute a, Substitute b) => Substitute (a, b) Source # 
Instance details

Defined in Futhark.Transform.Substitute

Methods

substituteNames :: Map VName VName -> (a, b) -> (a, b) Source #

Substitute shape => Substitute (TypeBase shape u) Source # 
Instance details

Defined in Futhark.Transform.Substitute

Methods

substituteNames :: Map VName VName -> TypeBase shape u -> TypeBase shape u Source #

(Substitute a, Substitute b, Substitute c) => Substitute (a, b, c) Source # 
Instance details

Defined in Futhark.Transform.Substitute

Methods

substituteNames :: Map VName VName -> (a, b, c) -> (a, b, c) Source #

(Substitute d, Substitute ret) => Substitute (MemInfo d u ret) Source # 
Instance details

Defined in Futhark.Representation.ExplicitMemory

Methods

substituteNames :: Map VName VName -> MemInfo d u ret -> MemInfo d u ret Source #

(Substitute a, Substitute b, Substitute c, Substitute d) => Substitute (a, b, c, d) Source # 
Instance details

Defined in Futhark.Transform.Substitute

Methods

substituteNames :: Map VName VName -> (a, b, c, d) -> (a, b, c, d) Source #

type Substitutable lore = (Annotations lore, Substitute (ExpAttr lore), Substitute (BodyAttr lore), Substitute (LetAttr lore), Substitute (FParamAttr lore), Substitute (LParamAttr lore), Substitute (RetType lore), Substitute (BranchType lore), Substitute (Op lore)) Source #

Lores in which all annotations support name substitution.