| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Language.PureScript.CST.Types
Description
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 # | |
| 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.8-3suDZOoNqEmGMNoGwLr2r9" 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 #
Constructors
| SourceRange | |
Instances
Instances
| Functor Comment Source # | |
| Eq l => Eq (Comment l) Source # | |
| Ord l => Ord (Comment l) Source # | |
| 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.8-3suDZOoNqEmGMNoGwLr2r9" 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)))) | |
Constructors
| TokenAnn | |
Fields
| |
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.8-3suDZOoNqEmGMNoGwLr2r9" 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 | |
| Ord SourceStyle Source # | |
Defined in Language.PureScript.CST.Types Methods 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 Methods showsPrec :: Int -> SourceStyle -> ShowS # show :: SourceStyle -> String # showList :: [SourceStyle] -> ShowS # | |
| Generic SourceStyle Source # | |
Defined in Language.PureScript.CST.Types Associated Types type Rep SourceStyle :: Type -> Type # | |
| type Rep SourceStyle Source # | |
Constructors
Instances
data SourceToken Source #
Constructors
| SourceToken | |
Instances
Constructors
| Name | |
Fields
| |
Instances
| Functor Name Source # | |
| Foldable Name Source # | |
Defined in Language.PureScript.CST.Types Methods 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.8-3suDZOoNqEmGMNoGwLr2r9" 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 #
Constructors
| QualifiedName | |
Fields
| |
Instances
Constructors
| Label | |
Fields
| |
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.8-3suDZOoNqEmGMNoGwLr2r9" False) (C1 (MetaCons "Label" PrefixI True) (S1 (MetaSel (Just "lblTok") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 SourceToken) :*: S1 (MetaSel (Just "lblName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 PSString))) | |
Constructors
| Wrapped | |
Fields
| |
Instances
Constructors
| Separated | |
Fields
| |
Instances
Constructors
| Labeled | |
Fields
| |
Instances
type DelimitedNonEmpty a = Wrapped (Separated a) Source #
data OneOrDelimited a Source #
Constructors
| One a | |
| Many (DelimitedNonEmpty a) |
Instances
Constructors
| KindName a (QualifiedName (ProperName KindName)) | |
| KindArr a (Kind a) SourceToken (Kind a) | |
| KindRow a SourceToken (Kind a) | |
| KindParens a (Wrapped (Kind a)) |
Instances
Constructors
| 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 #
Constructors
| TypeVarKinded (Wrapped (Labeled (Name Ident) (Kind a))) | |
| TypeVarName (Name Ident) |
Instances
data Constraint a Source #
Constructors
| Constraint a (QualifiedName (ProperName ClassName)) [Type a] | |
| ConstraintParens a (Wrapped (Constraint a)) |
Instances
Constructors
| Row | |
Instances
| Functor Row Source # | |
| Foldable Row Source # | |
Defined in Language.PureScript.CST.Types Methods 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.8-3suDZOoNqEmGMNoGwLr2r9" 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))))) | |
Constructors
| Module | |
Fields
| |
Instances
Constructors
| 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 #
Constructors
| DataAll a SourceToken | |
| DataEnumerated a (Delimited (Name (ProperName ConstructorName))) |
Instances
data Declaration a Source #
Constructors
| 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
Constructors
| Instance | |
Fields
| |
Instances
data InstanceBinding a Source #
Constructors
| InstanceBindingSignature a (Labeled (Name Ident) (Type a)) | |
| InstanceBindingName a (ValueBindingFields a) |
Instances
data ImportDecl a Source #
Constructors
| ImportDecl | |
Fields
| |
Instances
Constructors
| 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
Constructors
| DataHead | |
Fields
| |
Instances
Constructors
| DataCtor | |
Fields
| |
Instances
Constructors
| ClassHead | |
Fields
| |
Instances
data ClassFundep Source #
Constructors
| FundepDetermined SourceToken (NonEmpty (Name Ident)) | |
| FundepDetermines (NonEmpty (Name Ident)) SourceToken (NonEmpty (Name Ident)) |
Instances
data InstanceHead a Source #
Constructors
| InstanceHead | |
Fields
| |
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.8-3suDZOoNqEmGMNoGwLr2r9" 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))) | |
Constructors
Instances
data FixityFields Source #
Constructors
| FixityFields | |
Fields
| |
Instances
data ValueBindingFields a Source #
Constructors
| ValueBindingFields | |
Fields
| |
Instances
Constructors
| Unconditional SourceToken (Where a) | |
| Guarded (NonEmpty (GuardedExpr a)) |
Instances
data GuardedExpr a Source #
Constructors
| GuardedExpr | |
Fields
| |
Instances
data PatternGuard a Source #
Constructors
| PatternGuard | |
Instances
Constructors
| ForeignValue (Labeled (Name Ident) (Type a)) | |
| ForeignData SourceToken (Labeled (Name (ProperName TypeName)) (Kind a)) | |
| ForeignKind SourceToken (Name (ProperName KindName)) |
Instances
Constructors
| 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 #
Constructors
| RecordPun (Name Ident) | |
| RecordField Label SourceToken a |
Instances
data RecordUpdate a Source #
Constructors
| RecordUpdateLeaf Label SourceToken (Expr a) | |
| RecordUpdateBranch Label (DelimitedNonEmpty (RecordUpdate a)) |
Instances
data RecordAccessor a Source #
Constructors
| RecordAccessor | |
Instances
Constructors
| Lambda | |
Fields
| |
Instances
data IfThenElse a Source #
Constructors
| IfThenElse | |
Fields
| |
Instances
Constructors
| CaseOf | |
Fields
| |
Instances
Constructors
| LetIn | |
Fields
| |
Instances
Constructors
| Where | |
Fields
| |
Instances
| Functor Where Source # | |
| Foldable Where Source # | |
Defined in Language.PureScript.CST.Types Methods fold :: Monoid m => Where m -> m # foldMap :: Monoid m => (a -> m) -> Where a -> m # foldr :: (a -> b -> b) -> b -> Where a -> b # foldr' :: (a -> b -> b) -> b -> Where a -> b # foldl :: (b -> a -> b) -> b -> Where a -> b # foldl' :: (b -> a -> b) -> b -> Where a -> b # foldr1 :: (a -> a -> a) -> Where a -> a # foldl1 :: (a -> a -> a) -> Where a -> a # elem :: Eq a => a -> Where a -> Bool # maximum :: Ord a => Where a -> a # minimum :: Ord a => Where a -> a # | |
| Traversable Where Source # | |
| Eq a => Eq (Where a) Source # | |
| Ord a => Ord (Where a) Source # | |
Defined in Language.PureScript.CST.Types | |
| Show a => Show (Where a) Source # | |
| Generic (Where a) Source # | |
| type Rep (Where a) Source # | |
Defined in Language.PureScript.CST.Types type Rep (Where a) = D1 (MetaData "Where" "Language.PureScript.CST.Types" "purescript-0.13.8-3suDZOoNqEmGMNoGwLr2r9" False) (C1 (MetaCons "Where" PrefixI True) (S1 (MetaSel (Just "whereExpr") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr a)) :*: S1 (MetaSel (Just "whereBindings") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (SourceToken, NonEmpty (LetBinding a)))))) | |
data LetBinding a Source #
Constructors
| LetBindingSignature a (Labeled (Name Ident) (Type a)) | |
| LetBindingName a (ValueBindingFields a) | |
| LetBindingPattern a (Binder a) SourceToken (Where a) |
Instances
Constructors
| DoBlock | |
Fields
| |
Instances
data DoStatement a Source #
Constructors
| DoLet SourceToken (NonEmpty (LetBinding a)) | |
| DoDiscard (Expr a) | |
| DoBind (Binder a) SourceToken (Expr a) |
Instances
Constructors
| AdoBlock | |
Fields
| |
Instances
Constructors
| 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) |