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

Futhark.IR.Prop.Patterns

Description

Inspecing and modifying Patterns, 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.

Pattern elements

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

An Ident corresponding to a pattern element.

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

The type of a name bound by a PatElem.

setPatElemLore :: PatElemT oldattr -> newattr -> PatElemT newattr Source #

Set the lore of a PatElem.

patternElements :: PatternT dec -> [PatElemT dec] Source #

All pattern elements in the pattern - context first, then values.

patternIdents :: Typed dec => PatternT dec -> [Ident] Source #

Return a list of the Idents bound by the Pattern.

patternContextIdents :: Typed dec => PatternT dec -> [Ident] Source #

Return a list of the context Idents bound by the Pattern.

patternValueIdents :: Typed dec => PatternT dec -> [Ident] Source #

Return a list of the value Idents bound by the Pattern.

patternNames :: PatternT dec -> [VName] Source #

Return a list of the Names bound by the Pattern.

patternValueNames :: PatternT dec -> [VName] Source #

Return a list of the Names bound by the value part of the Pattern.

patternContextNames :: PatternT dec -> [VName] Source #

Return a list of the Names bound by the context part of the Pattern.

patternTypes :: Typed dec => PatternT dec -> [Type] Source #

Return a list of the typess bound by the pattern.

patternValueTypes :: Typed dec => PatternT dec -> [Type] Source #

Return a list of the typess bound by the value part of the pattern.

patternSize :: PatternT dec -> Int Source #

Return the number of names bound by the pattern.

Pattern construction

basicPattern :: [Ident] -> [Ident] -> PatternT Type Source #

Create a pattern using Type as the attribute.