Module
PureScript.CST.Types
- Package
- purescript-language-cst-parser
- Repository
- natefaubion/purescript-language-cst-parser
#ModuleName Source
#SourceRange Source
type SourceRange = { end :: SourcePos, start :: SourcePos }
#Token Source
data Token
Constructors
TokLeftParen
TokRightParen
TokLeftBrace
TokRightBrace
TokLeftSquare
TokRightSquare
TokLeftArrow SourceStyle
TokRightArrow SourceStyle
TokRightFatArrow SourceStyle
TokDoubleColon SourceStyle
TokForall SourceStyle
TokEquals
TokPipe
TokTick
TokDot
TokComma
TokUnderscore
TokBackslash
TokAt
TokLowerName (Maybe ModuleName) String
TokUpperName (Maybe ModuleName) String
TokOperator (Maybe ModuleName) String
TokSymbolName (Maybe ModuleName) String
TokSymbolArrow SourceStyle
TokHole String
TokChar String Char
TokString String String
TokRawString String
TokInt String IntValue
TokNumber String Number
TokLayoutStart Int
TokLayoutSep Int
TokLayoutEnd Int
Instances
#SourceToken Source
type SourceToken = { leadingComments :: Array (Comment LineFeed), range :: SourceRange, trailingComments :: Array (Comment Void), value :: Token }
#QualifiedName Source
newtype QualifiedName a
Constructors
QualifiedName { module :: Maybe ModuleName, name :: a, token :: SourceToken }
Instances
Newtype (QualifiedName a) _
#Wrapped Source
newtype Wrapped a
Constructors
Wrapped { close :: SourceToken, open :: SourceToken, value :: a }
Instances
#Labeled Source
newtype Labeled a b
Constructors
Labeled { label :: a, separator :: SourceToken, value :: b }
Instances
#DelimitedNonEmpty Source
type DelimitedNonEmpty a = Wrapped (Separated a)
#Type Source
data Type e
Constructors
TypeVar (Name Ident)
TypeConstructor (QualifiedName Proper)
TypeWildcard SourceToken
TypeHole (Name Ident)
TypeString SourceToken String
TypeInt (Maybe SourceToken) SourceToken IntValue
TypeRow (Wrapped (Row e))
TypeRecord (Wrapped (Row e))
TypeForall SourceToken (NonEmptyArray (TypeVarBinding (Prefixed (Name Ident)) e)) SourceToken (Type e)
TypeKinded (Type e) SourceToken (Type e)
TypeApp (Type e) (NonEmptyArray (Type e))
TypeOp (Type e) (NonEmptyArray (Tuple (QualifiedName Operator) (Type e)))
TypeOpName (QualifiedName Operator)
TypeArrow (Type e) SourceToken (Type e)
TypeArrowName SourceToken
TypeConstrained (Type e) SourceToken (Type e)
TypeParens (Wrapped (Type e))
TypeError e
#Module Source
#ModuleHeader Source
newtype ModuleHeader e
Constructors
ModuleHeader { exports :: Maybe (DelimitedNonEmpty (Export e)), imports :: Array (ImportDecl e), keyword :: SourceToken, name :: Name ModuleName, where :: SourceToken }
Instances
Newtype (ModuleHeader e) _
#ModuleBody Source
newtype ModuleBody e
Constructors
ModuleBody { decls :: Array (Declaration e), end :: SourcePos, trailingComments :: Array (Comment LineFeed) }
Instances
Newtype (ModuleBody e) _
#Declaration Source
data Declaration e
Constructors
DeclData (DataHead e) (Maybe (Tuple SourceToken (Separated (DataCtor e))))
DeclType (DataHead e) SourceToken (Type e)
DeclNewtype (DataHead e) SourceToken (Name Proper) (Type e)
DeclClass (ClassHead e) (Maybe (Tuple SourceToken (NonEmptyArray (Labeled (Name Ident) (Type e)))))
DeclInstanceChain (Separated (Instance e))
DeclDerive SourceToken (Maybe SourceToken) (InstanceHead e)
DeclKindSignature SourceToken (Labeled (Name Proper) (Type e))
DeclSignature (Labeled (Name Ident) (Type e))
DeclValue (ValueBindingFields e)
DeclFixity FixityFields
DeclForeign SourceToken SourceToken (Foreign e)
DeclRole SourceToken SourceToken (Name Proper) (NonEmptyArray (Tuple SourceToken Role))
DeclError e
#Instance Source
newtype Instance e
Constructors
Instance { body :: Maybe (Tuple SourceToken (NonEmptyArray (InstanceBinding e))), head :: InstanceHead e }
Instances
#InstanceBinding Source
data InstanceBinding e
Constructors
#ImportDecl Source
newtype ImportDecl e
Constructors
ImportDecl { keyword :: SourceToken, module :: Name ModuleName, names :: Maybe (Tuple (Maybe SourceToken) (DelimitedNonEmpty (Import e))), qualified :: Maybe (Tuple SourceToken (Name ModuleName)) }
Instances
Newtype (ImportDecl e) _
#DataHead Source
type DataHead e = { keyword :: SourceToken, name :: Name Proper, vars :: Array (TypeVarBinding (Name Ident) e) }
#ClassHead Source
type ClassHead e = { fundeps :: Maybe (Tuple SourceToken (Separated ClassFundep)), keyword :: SourceToken, name :: Name Proper, super :: Maybe (Tuple (OneOrDelimited (Type e)) SourceToken), vars :: Array (TypeVarBinding (Name Ident) e) }
#ClassFundep Source
data ClassFundep
Constructors
#InstanceHead Source
type InstanceHead e = { className :: QualifiedName Proper, constraints :: Maybe (Tuple (OneOrDelimited (Type e)) SourceToken), keyword :: SourceToken, name :: Maybe (Tuple (Name Ident) SourceToken), types :: Array (Type e) }
#FixityFields Source
type FixityFields = { keyword :: Tuple SourceToken Fixity, operator :: FixityOp, prec :: Tuple SourceToken Int }
#GuardedExpr Source
newtype GuardedExpr e
Constructors
GuardedExpr { bar :: SourceToken, patterns :: Separated (PatternGuard e), separator :: SourceToken, where :: Where e }
Instances
Newtype (GuardedExpr e) _
#PatternGuard Source
newtype PatternGuard e
Constructors
PatternGuard { binder :: Maybe (Tuple (Binder e) SourceToken), expr :: Expr e }
Instances
Newtype (PatternGuard e) _
#Foreign Source
data Foreign e
Constructors
ForeignValue (Labeled (Name Ident) (Type e))
ForeignData SourceToken (Labeled (Name Proper) (Type e))
ForeignKind SourceToken (Name Proper)
#Expr Source
data Expr e
Constructors
ExprHole (Name Ident)
ExprSection SourceToken
ExprIdent (QualifiedName Ident)
ExprConstructor (QualifiedName Proper)
ExprBoolean SourceToken Boolean
ExprChar SourceToken Char
ExprString SourceToken String
ExprInt SourceToken IntValue
ExprNumber SourceToken Number
ExprArray (Delimited (Expr e))
ExprRecord (Delimited (RecordLabeled (Expr e)))
ExprParens (Wrapped (Expr e))
ExprTyped (Expr e) SourceToken (Type e)
ExprInfix (Expr e) (NonEmptyArray (Tuple (Wrapped (Expr e)) (Expr e)))
ExprOp (Expr e) (NonEmptyArray (Tuple (QualifiedName Operator) (Expr e)))
ExprOpName (QualifiedName Operator)
ExprNegate SourceToken (Expr e)
ExprRecordAccessor (RecordAccessor e)
ExprRecordUpdate (Expr e) (DelimitedNonEmpty (RecordUpdate e))
ExprApp (Expr e) (NonEmptyArray (AppSpine Expr e))
ExprLambda (Lambda e)
ExprIf (IfThenElse e)
ExprCase (CaseOf e)
ExprLet (LetIn e)
ExprDo (DoBlock e)
ExprAdo (AdoBlock e)
ExprError e
#RecordUpdate Source
data RecordUpdate e
Constructors
#RecordAccessor Source
type RecordAccessor e = { dot :: SourceToken, expr :: Expr e, path :: Separated (Name Label) }
#Lambda Source
type Lambda e = { arrow :: SourceToken, binders :: NonEmptyArray (Binder e), body :: Expr e, symbol :: SourceToken }
#IfThenElse Source
type IfThenElse e = { cond :: Expr e, else :: SourceToken, false :: Expr e, keyword :: SourceToken, then :: SourceToken, true :: Expr e }
#CaseOf Source
type CaseOf e = { branches :: NonEmptyArray (Tuple (Separated (Binder e)) (Guarded e)), head :: Separated (Expr e), keyword :: SourceToken, of :: SourceToken }
#LetIn Source
type LetIn e = { bindings :: NonEmptyArray (LetBinding e), body :: Expr e, in :: SourceToken, keyword :: SourceToken }
#Where Source
newtype Where e
Constructors
Where { bindings :: Maybe (Tuple SourceToken (NonEmptyArray (LetBinding e))), expr :: Expr e }
Instances
#LetBinding Source
data LetBinding e
Constructors
#DoBlock Source
type DoBlock e = { keyword :: SourceToken, statements :: NonEmptyArray (DoStatement e) }
#DoStatement Source
data DoStatement e
Constructors
DoLet SourceToken (NonEmptyArray (LetBinding e))
DoDiscard (Expr e)
DoBind (Binder e) SourceToken (Expr e)
DoError e
#AdoBlock Source
type AdoBlock e = { in :: SourceToken, keyword :: SourceToken, result :: Expr e, statements :: Array (DoStatement e) }
#Binder Source
data Binder e
Constructors
BinderWildcard SourceToken
BinderVar (Name Ident)
BinderNamed (Name Ident) SourceToken (Binder e)
BinderConstructor (QualifiedName Proper) (Array (Binder e))
BinderBoolean SourceToken Boolean
BinderChar SourceToken Char
BinderString SourceToken String
BinderInt (Maybe SourceToken) SourceToken IntValue
BinderNumber (Maybe SourceToken) SourceToken Number
BinderArray (Delimited (Binder e))
BinderRecord (Delimited (RecordLabeled (Binder e)))
BinderParens (Wrapped (Binder e))
BinderTyped (Binder e) SourceToken (Type e)
BinderOp (Binder e) (NonEmptyArray (Tuple (QualifiedName Operator) (Binder e)))
BinderError e
- Modules
- PureScript.
CST - PureScript.
CST. Errors - PureScript.
CST. Layout - PureScript.
CST. Lexer - PureScript.
CST. ModuleGraph - PureScript.
CST. Parser - PureScript.
CST. Parser. Monad - PureScript.
CST. Print - PureScript.
CST. Range - PureScript.
CST. Range. TokenList - PureScript.
CST. TokenStream - PureScript.
CST. Traversal - PureScript.
CST. Types