| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
Language.PureScript.AST.Binders
Description
Case binders
- data Binder
- = NullBinder
- | LiteralBinder (Literal Binder)
- | VarBinder Ident
- | ConstructorBinder (Qualified (ProperName ConstructorName)) [Binder]
- | OpBinder (Qualified (OpName ValueOpName))
- | BinaryNoParensBinder Binder Binder Binder
- | ParensInBinder Binder
- | NamedBinder Ident Binder
- | PositionedBinder SourceSpan [Comment] Binder
- | TypedBinder Type Binder
- binderNames :: Binder -> [Ident]
Documentation
Data type for binders
Constructors
| NullBinder | Wildcard binder |
| LiteralBinder (Literal Binder) | A binder which matches a literal |
| VarBinder Ident | A binder which binds an identifier |
| ConstructorBinder (Qualified (ProperName ConstructorName)) [Binder] | A binder which matches a data constructor |
| OpBinder (Qualified (OpName ValueOpName)) | A operator alias binder. During the rebracketing phase of desugaring, this data constructor will be removed. |
| BinaryNoParensBinder Binder Binder Binder | Binary operator application. During the rebracketing phase of desugaring, this data constructor will be removed. |
| ParensInBinder Binder | Explicit parentheses. During the rebracketing phase of desugaring, this data constructor will be removed. Note: although it seems this constructor is not used, it _is_ useful, since it prevents certain traversals from matching. |
| NamedBinder Ident Binder | A binder which binds its input to an identifier |
| PositionedBinder SourceSpan [Comment] Binder | A binder with source position information |
| TypedBinder Type Binder | A binder with a type annotation |
binderNames :: Binder -> [Ident] Source #
Collect all names introduced in binders in an expression