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

Safe Haskell | Safe-Inferred
Language | GHC2021

Futhark.IR.Prop.Pat

Contents

- Function parameters
- Pat elements
- Pat construction

Description

Inspecing and modifying `Pat`s, function parameters and pattern elements.

Synopsis

- paramIdent :: Typed dec => Param dec -> Ident
- paramType :: Typed dec => Param dec -> Type
- paramDeclType :: DeclTyped dec => Param dec -> DeclType
- patElemIdent :: Typed dec => PatElem dec -> Ident
- patElemType :: Typed dec => PatElem dec -> Type
- setPatElemDec :: PatElem oldattr -> newattr -> PatElem newattr
- patIdents :: Typed dec => Pat dec -> [Ident]
- patNames :: Pat dec -> [VName]
- patTypes :: Typed dec => Pat dec -> [Type]
- patSize :: Pat dec -> Int
- basicPat :: [Ident] -> Pat Type

# Function parameters

paramIdent :: Typed dec => Param dec -> Ident Source #

An `Ident` corresponding to a parameter.

paramType :: Typed dec => Param dec -> Type Source #

The `Type` of a parameter.

paramDeclType :: DeclTyped dec => Param dec -> DeclType Source #

The `DeclType` of a parameter.

# Pat elements

patElemIdent :: Typed dec => PatElem dec -> Ident Source #

An `Ident` corresponding to a pattern element.

patElemType :: Typed dec => PatElem dec -> Type Source #

The type of a name bound by a `PatElem`.

setPatElemDec :: PatElem oldattr -> newattr -> PatElem newattr Source #

Set the rep of a `PatElem`.

patIdents :: Typed dec => Pat dec -> [Ident] Source #

Return a list of the `Ident`s bound by the `Pat`.

patNames :: Pat dec -> [VName] Source #

Return a list of the `Name`s bound by the `Pat`.

patTypes :: Typed dec => Pat dec -> [Type] Source #

Return a list of the typess bound by the pattern.

patSize :: Pat dec -> Int Source #

Return the number of names bound by the pattern.

# Pat construction

basicPat :: [Ident] -> Pat Type Source #

Create a pattern using `Type` as the attribute.