Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module contains data types for the entire PureScript surface language. Every token is represented in the tree, and every token is annotated with whitespace and comments (both leading and trailing). This means one can write an exact printer so that `print . parse = id`. Every constructor is laid out with tokens in left-to-right order. The core productions are given a slot for arbitrary annotations, however this is not used by the parser.
Documentation
Instances
Eq SourcePos Source # | |
Ord SourcePos Source # | |
Defined in Language.PureScript.CST.Types | |
Show SourcePos Source # | |
Generic SourcePos Source # | |
type Rep SourcePos Source # | |
Defined in Language.PureScript.CST.Types type Rep SourcePos = D1 (MetaData "SourcePos" "Language.PureScript.CST.Types" "purescript-0.13.0-1whdl2565Nb1wvlLK7uK18" False) (C1 (MetaCons "SourcePos" PrefixI True) (S1 (MetaSel (Just "srcLine") SourceUnpack SourceStrict DecidedStrict) (Rec0 Int) :*: S1 (MetaSel (Just "srcColumn") SourceUnpack SourceStrict DecidedStrict) (Rec0 Int))) |
data SourceRange Source #
Instances
Instances
Functor Comment Source # | |
Eq l => Eq (Comment l) Source # | |
Ord l => Ord (Comment l) Source # | |
Defined in Language.PureScript.CST.Types | |
Show l => Show (Comment l) Source # | |
Generic (Comment l) Source # | |
type Rep (Comment l) Source # | |
Defined in Language.PureScript.CST.Types type Rep (Comment l) = D1 (MetaData "Comment" "Language.PureScript.CST.Types" "purescript-0.13.0-1whdl2565Nb1wvlLK7uK18" False) (C1 (MetaCons "Comment" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)) :+: (C1 (MetaCons "Space" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) SourceUnpack SourceStrict DecidedStrict) (Rec0 Int)) :+: C1 (MetaCons "Line" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 l)))) |
TokenAnn | |
|
Instances
Eq TokenAnn Source # | |
Ord TokenAnn Source # | |
Defined in Language.PureScript.CST.Types | |
Show TokenAnn Source # | |
Generic TokenAnn Source # | |
type Rep TokenAnn Source # | |
Defined in Language.PureScript.CST.Types type Rep TokenAnn = D1 (MetaData "TokenAnn" "Language.PureScript.CST.Types" "purescript-0.13.0-1whdl2565Nb1wvlLK7uK18" False) (C1 (MetaCons "TokenAnn" PrefixI True) (S1 (MetaSel (Just "tokRange") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 SourceRange) :*: (S1 (MetaSel (Just "tokLeadingComments") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 [Comment LineFeed]) :*: S1 (MetaSel (Just "tokTrailingComments") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 [Comment Void])))) |
data SourceStyle Source #
Instances
Eq SourceStyle Source # | |
Defined in Language.PureScript.CST.Types (==) :: SourceStyle -> SourceStyle -> Bool # (/=) :: SourceStyle -> SourceStyle -> Bool # | |
Ord SourceStyle Source # | |
Defined in Language.PureScript.CST.Types compare :: SourceStyle -> SourceStyle -> Ordering # (<) :: SourceStyle -> SourceStyle -> Bool # (<=) :: SourceStyle -> SourceStyle -> Bool # (>) :: SourceStyle -> SourceStyle -> Bool # (>=) :: SourceStyle -> SourceStyle -> Bool # max :: SourceStyle -> SourceStyle -> SourceStyle # min :: SourceStyle -> SourceStyle -> SourceStyle # | |
Show SourceStyle Source # | |
Defined in Language.PureScript.CST.Types showsPrec :: Int -> SourceStyle -> ShowS # show :: SourceStyle -> String # showList :: [SourceStyle] -> ShowS # | |
Generic SourceStyle Source # | |
Defined in Language.PureScript.CST.Types type Rep SourceStyle :: Type -> Type # from :: SourceStyle -> Rep SourceStyle x # to :: Rep SourceStyle x -> SourceStyle # | |
type Rep SourceStyle Source # | |
Instances
data SourceToken Source #
Instances
Name | |
|
Instances
Functor Name Source # | |
Foldable Name Source # | |
Defined in Language.PureScript.CST.Types fold :: Monoid m => Name m -> m # foldMap :: Monoid m => (a -> m) -> Name a -> m # foldr :: (a -> b -> b) -> b -> Name a -> b # foldr' :: (a -> b -> b) -> b -> Name a -> b # foldl :: (b -> a -> b) -> b -> Name a -> b # foldl' :: (b -> a -> b) -> b -> Name a -> b # foldr1 :: (a -> a -> a) -> Name a -> a # foldl1 :: (a -> a -> a) -> Name a -> a # elem :: Eq a => a -> Name a -> Bool # maximum :: Ord a => Name a -> a # | |
Traversable Name Source # | |
Eq a => Eq (Name a) Source # | |
Ord a => Ord (Name a) Source # | |
Show a => Show (Name a) Source # | |
Generic (Name a) Source # | |
type Rep (Name a) Source # | |
Defined in Language.PureScript.CST.Types type Rep (Name a) = D1 (MetaData "Name" "Language.PureScript.CST.Types" "purescript-0.13.0-1whdl2565Nb1wvlLK7uK18" False) (C1 (MetaCons "Name" PrefixI True) (S1 (MetaSel (Just "nameTok") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 SourceToken) :*: S1 (MetaSel (Just "nameValue") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))) |
data QualifiedName a Source #
QualifiedName | |
|
Instances
Label | |
|
Instances
Eq Label Source # | |
Ord Label Source # | |
Show Label Source # | |
Generic Label Source # | |
type Rep Label Source # | |
Defined in Language.PureScript.CST.Types type Rep Label = D1 (MetaData "Label" "Language.PureScript.CST.Types" "purescript-0.13.0-1whdl2565Nb1wvlLK7uK18" False) (C1 (MetaCons "Label" PrefixI True) (S1 (MetaSel (Just "lblTok") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 SourceToken) :*: S1 (MetaSel (Just "lblName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 PSString))) |
Wrapped | |
|
Instances
Separated | |
|
Instances
Labeled | |
|
Instances
type DelimitedNonEmpty a = Wrapped (Separated a) Source #
data OneOrDelimited a Source #
One a | |
Many (DelimitedNonEmpty a) |
Instances
KindName a (QualifiedName (ProperName KindName)) | |
KindArr a (Kind a) SourceToken (Kind a) | |
KindRow a SourceToken (Kind a) | |
KindParens a (Wrapped (Kind a)) |
Instances
TypeVar a (Name Ident) | |
TypeConstructor a (QualifiedName (ProperName TypeName)) | |
TypeWildcard a SourceToken | |
TypeHole a (Name Ident) | |
TypeString a SourceToken PSString | |
TypeRow a (Wrapped (Row a)) | |
TypeRecord a (Wrapped (Row a)) | |
TypeForall a SourceToken (NonEmpty (TypeVarBinding a)) SourceToken (Type a) | |
TypeKinded a (Type a) SourceToken (Kind a) | |
TypeApp a (Type a) (Type a) | |
TypeOp a (Type a) (QualifiedName (OpName TypeOpName)) (Type a) | |
TypeOpName a (QualifiedName (OpName TypeOpName)) | |
TypeArr a (Type a) SourceToken (Type a) | |
TypeArrName a SourceToken | |
TypeConstrained a (Constraint a) SourceToken (Type a) | |
TypeParens a (Wrapped (Type a)) |
Instances
data TypeVarBinding a Source #
TypeVarKinded (Wrapped (Labeled (Name Ident) (Kind a))) | |
TypeVarName (Name Ident) |
Instances
data Constraint a Source #
Constraint a (QualifiedName (ProperName ClassName)) [Type a] | |
ConstraintParens a (Wrapped (Constraint a)) |
Instances
Instances
Functor Row Source # | |
Foldable Row Source # | |
Defined in Language.PureScript.CST.Types fold :: Monoid m => Row m -> m # foldMap :: Monoid m => (a -> m) -> Row a -> m # foldr :: (a -> b -> b) -> b -> Row a -> b # foldr' :: (a -> b -> b) -> b -> Row a -> b # foldl :: (b -> a -> b) -> b -> Row a -> b # foldl' :: (b -> a -> b) -> b -> Row a -> b # foldr1 :: (a -> a -> a) -> Row a -> a # foldl1 :: (a -> a -> a) -> Row a -> a # elem :: Eq a => a -> Row a -> Bool # maximum :: Ord a => Row a -> a # | |
Traversable Row Source # | |
Eq a => Eq (Row a) Source # | |
Ord a => Ord (Row a) Source # | |
Show a => Show (Row a) Source # | |
Generic (Row a) Source # | |
type Rep (Row a) Source # | |
Defined in Language.PureScript.CST.Types type Rep (Row a) = D1 (MetaData "Row" "Language.PureScript.CST.Types" "purescript-0.13.0-1whdl2565Nb1wvlLK7uK18" False) (C1 (MetaCons "Row" PrefixI True) (S1 (MetaSel (Just "rowLabels") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Separated (Labeled Label (Type a))))) :*: S1 (MetaSel (Just "rowTail") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (SourceToken, Type a))))) |
Module | |
|
Instances
ExportValue a (Name Ident) | |
ExportOp a (Name (OpName ValueOpName)) | |
ExportType a (Name (ProperName TypeName)) (Maybe (DataMembers a)) | |
ExportTypeOp a SourceToken (Name (OpName TypeOpName)) | |
ExportClass a SourceToken (Name (ProperName ClassName)) | |
ExportKind a SourceToken (Name (ProperName KindName)) | |
ExportModule a SourceToken (Name ModuleName) |
Instances
data DataMembers a Source #
Instances
data Declaration a Source #
DeclData a (DataHead a) (Maybe (SourceToken, Separated (DataCtor a))) | |
DeclType a (DataHead a) SourceToken (Type a) | |
DeclNewtype a (DataHead a) SourceToken (Name (ProperName ConstructorName)) (Type a) | |
DeclClass a (ClassHead a) (Maybe (SourceToken, NonEmpty (Labeled (Name Ident) (Type a)))) | |
DeclInstanceChain a (Separated (Instance a)) | |
DeclDerive a SourceToken (Maybe SourceToken) (InstanceHead a) | |
DeclSignature a (Labeled (Name Ident) (Type a)) | |
DeclValue a (ValueBindingFields a) | |
DeclFixity a FixityFields | |
DeclForeign a SourceToken SourceToken (Foreign a) |
Instances
Instance | |
|
Instances
data InstanceBinding a Source #
InstanceBindingSignature a (Labeled (Name Ident) (Type a)) | |
InstanceBindingName a (ValueBindingFields a) |
Instances
data ImportDecl a Source #
ImportDecl | |
|
Instances
ImportValue a (Name Ident) | |
ImportOp a (Name (OpName ValueOpName)) | |
ImportType a (Name (ProperName TypeName)) (Maybe (DataMembers a)) | |
ImportTypeOp a SourceToken (Name (OpName TypeOpName)) | |
ImportClass a SourceToken (Name (ProperName ClassName)) | |
ImportKind a SourceToken (Name (ProperName KindName)) |
Instances
DataHead | |
|
Instances
DataCtor | |
|
Instances
ClassHead | |
|
Instances
data ClassFundep Source #
FundepDetermined SourceToken (NonEmpty (Name Ident)) | |
FundepDetermines (NonEmpty (Name Ident)) SourceToken (NonEmpty (Name Ident)) |
Instances
data InstanceHead a Source #
InstanceHead | |
|
Instances
Instances
Eq Fixity Source # | |
Ord Fixity Source # | |
Show Fixity Source # | |
Generic Fixity Source # | |
type Rep Fixity Source # | |
Defined in Language.PureScript.CST.Types type Rep Fixity = D1 (MetaData "Fixity" "Language.PureScript.CST.Types" "purescript-0.13.0-1whdl2565Nb1wvlLK7uK18" False) (C1 (MetaCons "Infix" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "Infixl" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Infixr" PrefixI False) (U1 :: Type -> Type))) |
Instances
data FixityFields Source #
FixityFields | |
|
Instances
data ValueBindingFields a Source #
ValueBindingFields | |
|
Instances
Unconditional SourceToken (Where a) | |
Guarded (NonEmpty (GuardedExpr a)) |
Instances
data GuardedExpr a Source #
GuardedExpr | |
|
Instances
data PatternGuard a Source #
Instances
ForeignValue (Labeled (Name Ident) (Type a)) | |
ForeignData SourceToken (Labeled (Name (ProperName TypeName)) (Kind a)) | |
ForeignKind SourceToken (Name (ProperName KindName)) |
Instances
ExprHole a (Name Ident) | |
ExprSection a SourceToken | |
ExprIdent a (QualifiedName Ident) | |
ExprConstructor a (QualifiedName (ProperName ConstructorName)) | |
ExprBoolean a SourceToken Bool | |
ExprChar a SourceToken Char | |
ExprString a SourceToken PSString | |
ExprNumber a SourceToken (Either Integer Double) | |
ExprArray a (Delimited (Expr a)) | |
ExprRecord a (Delimited (RecordLabeled (Expr a))) | |
ExprParens a (Wrapped (Expr a)) | |
ExprTyped a (Expr a) SourceToken (Type a) | |
ExprInfix a (Expr a) (Wrapped (Expr a)) (Expr a) | |
ExprOp a (Expr a) (QualifiedName (OpName ValueOpName)) (Expr a) | |
ExprOpName a (QualifiedName (OpName ValueOpName)) | |
ExprNegate a SourceToken (Expr a) | |
ExprRecordAccessor a (RecordAccessor a) | |
ExprRecordUpdate a (Expr a) (DelimitedNonEmpty (RecordUpdate a)) | |
ExprApp a (Expr a) (Expr a) | |
ExprLambda a (Lambda a) | |
ExprIf a (IfThenElse a) | |
ExprCase a (CaseOf a) | |
ExprLet a (LetIn a) | |
ExprDo a (DoBlock a) | |
ExprAdo a (AdoBlock a) |
Instances
data RecordLabeled a Source #
Instances
data RecordUpdate a Source #
RecordUpdateLeaf Label SourceToken (Expr a) | |
RecordUpdateBranch Label (DelimitedNonEmpty (RecordUpdate a)) |
Instances
data RecordAccessor a Source #
Instances
Lambda | |
|
Instances
data IfThenElse a Source #
IfThenElse | |
|
Instances
CaseOf | |
|
Instances
LetIn | |
|
Instances
Where | |
|
Instances
data LetBinding a Source #
LetBindingSignature a (Labeled (Name Ident) (Type a)) | |
LetBindingName a (ValueBindingFields a) | |
LetBindingPattern a (Binder a) SourceToken (Where a) |
Instances
DoBlock | |
|
Instances
data DoStatement a Source #
DoLet SourceToken (NonEmpty (LetBinding a)) | |
DoDiscard (Expr a) | |
DoBind (Binder a) SourceToken (Expr a) |
Instances
AdoBlock | |
|
Instances
BinderWildcard a SourceToken | |
BinderVar a (Name Ident) | |
BinderNamed a (Name Ident) SourceToken (Binder a) | |
BinderConstructor a (QualifiedName (ProperName ConstructorName)) [Binder a] | |
BinderBoolean a SourceToken Bool | |
BinderChar a SourceToken Char | |
BinderString a SourceToken PSString | |
BinderNumber a (Maybe SourceToken) SourceToken (Either Integer Double) | |
BinderArray a (Delimited (Binder a)) | |
BinderRecord a (Delimited (RecordLabeled (Binder a))) | |
BinderParens a (Wrapped (Binder a)) | |
BinderTyped a (Binder a) SourceToken (Type a) | |
BinderOp a (Binder a) (QualifiedName (OpName ValueOpName)) (Binder a) |