futhark-0.21.1: 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.

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

patVars :: Pat -> NameSet Source #

Extract all the variable names bound in a pattern.