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

Safe HaskellNone
LanguageHaskell2010

Futhark.Representation.AST.Attributes.Patterns

Contents

Description

Inspecing and modifying PatternTs, function parameters and pattern elements.

Synopsis

Function parameters

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

An Ident corresponding to a parameter.

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

The Type of a parameter.

paramDeclType :: DeclTyped attr => ParamT 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 PatternT.

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

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

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

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

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

Return a list of the Names bound by the PatternT.

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

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

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

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

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

Return a list of the typess bound by the PatternT.

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

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

patternExtTypes :: Typed attr => PatternT attr -> [ExtType] Source #

Return a list of the ExtTypess bound by the value part of the PatternT, with existentials where the sizes are part of the context part of the PatternT.

patternSize :: PatternT attr -> Int Source #

Return the number of names bound by the PatternT.

Pattern construction

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

Create a pattern using Type as the attribute.