Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Inspecing and modifying Pattern
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 => PatElemT dec -> Ident
- patElemType :: Typed dec => PatElemT dec -> Type
- setPatElemLore :: PatElemT oldattr -> newattr -> PatElemT newattr
- patternElements :: PatternT dec -> [PatElemT dec]
- patternIdents :: Typed dec => PatternT dec -> [Ident]
- patternContextIdents :: Typed dec => PatternT dec -> [Ident]
- patternValueIdents :: Typed dec => PatternT dec -> [Ident]
- patternNames :: PatternT dec -> [VName]
- patternValueNames :: PatternT dec -> [VName]
- patternContextNames :: PatternT dec -> [VName]
- patternTypes :: Typed dec => PatternT dec -> [Type]
- patternValueTypes :: Typed dec => PatternT dec -> [Type]
- patternSize :: PatternT dec -> Int
- basicPattern :: [Ident] -> [Ident] -> PatternT Type
Function parameters
Pattern elements
patElemIdent :: Typed dec => PatElemT dec -> Ident Source #
An Ident
corresponding to a pattern element.
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.
patternValueNames :: PatternT dec -> [VName] Source #
patternContextNames :: PatternT dec -> [VName] Source #
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.