purescript-0.13.0: PureScript Programming Language Compiler

Safe HaskellNone
LanguageHaskell2010

Language.PureScript.AST.Binders

Description

Case binders

Synopsis

Documentation

data Binder Source #

Data type for binders

Constructors

NullBinder

Wildcard binder

LiteralBinder SourceSpan (Literal Binder)

A binder which matches a literal

VarBinder SourceSpan Ident

A binder which binds an identifier

ConstructorBinder SourceSpan (Qualified (ProperName ConstructorName)) [Binder]

A binder which matches a data constructor

OpBinder SourceSpan (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 SourceSpan Ident Binder

A binder which binds its input to an identifier

PositionedBinder SourceSpan [Comment] Binder

A binder with source position information

TypedBinder SourceType Binder

A binder with a type annotation

Instances
Eq Binder Source # 
Instance details

Defined in Language.PureScript.AST.Binders

Methods

(==) :: Binder -> Binder -> Bool #

(/=) :: Binder -> Binder -> Bool #

Ord Binder Source # 
Instance details

Defined in Language.PureScript.AST.Binders

Show Binder Source # 
Instance details

Defined in Language.PureScript.AST.Binders

binderNames :: Binder -> [Ident] Source #

Collect all names introduced in binders in an expression