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
|