futhark-0.21.11: An optimising compiler for a functional, array-oriented language.
Safe HaskellNone
LanguageHaskell2010

Futhark.IR.Prop.Patterns

Description

Inspecing and modifying Pats, function parameters and pattern elements.

Synopsis

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 Idents bound by the Pat.

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

Return a list of the Names 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.