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

Language.Futhark.FreeVars

Description

Facilities for computing free term variables in various syntactic constructs.

Synopsis

Documentation

freeInExp :: ExpBase Info VName -> FV Source #

Compute the set of free variables of an expression.

freeInPat :: Pat (TypeBase Size u) -> FV Source #

Free variables in pattern (including types of the bound identifiers).

freeInType :: TypeBase Size u -> FV Source #

Free variables in the type (meaning those that are used in size expression).

freeWithout :: FV -> Set VName -> FV Source #

Set subtraction. Do not consider those variables as free.

data FV Source #

A set of names.

Instances

Instances details
Monoid FV Source # 
Instance details

Defined in Language.Futhark.FreeVars

Methods

mempty :: FV #

mappend :: FV -> FV -> FV #

mconcat :: [FV] -> FV #

Semigroup FV Source # 
Instance details

Defined in Language.Futhark.FreeVars

Methods

(<>) :: FV -> FV -> FV #

sconcat :: NonEmpty FV -> FV #

stimes :: Integral b => b -> FV -> FV #

Show FV Source # 
Instance details

Defined in Language.Futhark.FreeVars

Methods

showsPrec :: Int -> FV -> ShowS #

show :: FV -> String #

showList :: [FV] -> ShowS #

fvVars :: FV -> Set VName Source #

The set of names in an FV.