futhark-0.20.0: An optimising compiler for a functional, array-oriented language.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Futhark.Internalise.FreeVars

Description

Facilities for computing free variables in an expression, which we need for both lambda-lifting and defunctionalisation.

Synopsis

Documentation

freeVars :: Exp -> NameSet Source #

Compute the set of free variables of an expression.

without :: NameSet -> Set VName -> NameSet Source #

Set subtraction.

member :: VName -> NameSet -> Bool Source #

Is this name in the NameSet?

ident :: Ident -> NameSet Source #

A NameSet with a single Nonunique name.

newtype NameSet Source #

A set of names where we also track uniqueness.

Constructors

NameSet 

Instances

Instances details
Show NameSet Source # 
Instance details

Defined in Futhark.Internalise.FreeVars

Semigroup NameSet Source # 
Instance details

Defined in Futhark.Internalise.FreeVars

Monoid NameSet Source # 
Instance details

Defined in Futhark.Internalise.FreeVars

patternVars :: Pattern -> NameSet Source #

Extract all the variable names bound in a pattern.