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

Futhark.Representation.AST.Attributes.Patterns

Description

Inspecing and modifying Patterns, function parameters and pattern elements.

Synopsis

Function parameters

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

An Ident corresponding to a parameter.

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

The Type of a parameter.

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

The DeclType of a parameter.

Pattern elements

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

An Ident corresponding to a pattern element.

patElemType :: Typed attr => PatElemT attr -> 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 attr -> [PatElemT attr] Source #

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

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

Return a list of the Idents bound by the Pattern.

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

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

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

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

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

Return a list of the Names bound by the Pattern.

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

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

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

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

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

Return a list of the typess bound by the Pattern.

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

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

patternSize :: PatternT attr -> 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.