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

Safe Haskell | None
Language | GHC2021

Language.Futhark.FreeVars

Description

Facilities for computing free term variables in various syntactic constructs.

Synopsis

- freeInExp :: ExpBase Info VName -> FV
- freeInPat :: Pat (TypeBase Size u) -> FV
- freeInType :: TypeBase Size u -> FV
- freeWithout :: FV -> Set VName -> FV
- data FV
- fvVars :: FV -> Set VName

# 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 Source # mappend :: FV -> FV -> FV Source # mconcat :: [FV] -> FV Source #
Semigroup FV Source # |
Instance details Defined in Language.Futhark.FreeVars Methods (<>) :: FV -> FV -> FV Source # sconcat :: NonEmpty FV -> FV Source # stimes :: Integral b => b -> FV -> FV Source #
Show FV Source # |
Instance details Defined in Language.Futhark.FreeVars Methods showsPrec :: Int -> FV -> ShowS Source # show :: FV -> String Source # showList :: [FV] -> ShowS Source #

fvVars :: FV -> Set VName Source #

The set of names in an `FV`.