purescript-0.13.2: PureScript Programming Language Compiler

Safe HaskellNone
LanguageHaskell2010

Language.PureScript.AST.Declarations

Description

Data types for modules and declarations

Synopsis

Documentation

type Context = [(Ident, SourceType)] Source #

A map of locally-bound names in scope.

data TypeSearch Source #

Holds the data necessary to do type directed search for typed holes

Constructors

TSBefore Environment

An Environment captured for later consumption by type directed search

TSAfter

Results of applying type directed search to the previously captured Environment

Fields

data SimpleErrorMessage Source #

A type of error messages

Constructors

ModuleNotFound ModuleName 
ErrorParsingFFIModule FilePath (Maybe ErrorMessage) 
ErrorParsingModule ParseError 
ErrorParsingCSTModule ParserError 
MissingFFIModule ModuleName 
UnnecessaryFFIModule ModuleName FilePath 
MissingFFIImplementations ModuleName [Ident] 
UnusedFFIImplementations ModuleName [Ident] 
InvalidFFIIdentifier ModuleName Text 
CannotGetFileInfo FilePath 
CannotReadFile FilePath 
CannotWriteFile FilePath 
InfiniteType SourceType 
InfiniteKind SourceKind 
MultipleValueOpFixities (OpName ValueOpName) 
MultipleTypeOpFixities (OpName TypeOpName) 
OrphanTypeDeclaration Ident 
RedefinedIdent Ident 
OverlappingNamesInLet 
UnknownName (Qualified Name) 
UnknownImport ModuleName Name 
UnknownImportDataConstructor ModuleName (ProperName TypeName) (ProperName ConstructorName) 
UnknownExport Name 
UnknownExportDataConstructor (ProperName TypeName) (ProperName ConstructorName) 
ScopeConflict Name [ModuleName] 
ScopeShadowing Name (Maybe ModuleName) [ModuleName] 
DeclConflict Name Name 
ExportConflict (Qualified Name) (Qualified Name) 
DuplicateModule ModuleName 
DuplicateTypeClass (ProperName ClassName) SourceSpan 
DuplicateInstance Ident SourceSpan 
DuplicateTypeArgument Text 
InvalidDoBind 
InvalidDoLet 
CycleInDeclaration Ident 
CycleInTypeSynonym (Maybe (ProperName TypeName)) 
CycleInTypeClassDeclaration [Qualified (ProperName ClassName)] 
CycleInModules [ModuleName] 
NameIsUndefined Ident 
UndefinedTypeVariable (ProperName TypeName) 
PartiallyAppliedSynonym (Qualified (ProperName TypeName)) 
EscapedSkolem Text (Maybe SourceSpan) SourceType 
TypesDoNotUnify SourceType SourceType 
KindsDoNotUnify SourceKind SourceKind 
ConstrainedTypeUnified SourceType SourceType 
OverlappingInstances (Qualified (ProperName ClassName)) [SourceType] [Qualified Ident] 
NoInstanceFound SourceConstraint 
AmbiguousTypeVariables SourceType SourceConstraint 
UnknownClass (Qualified (ProperName ClassName)) 
PossiblyInfiniteInstance (Qualified (ProperName ClassName)) [SourceType] 
CannotDerive (Qualified (ProperName ClassName)) [SourceType] 
InvalidDerivedInstance (Qualified (ProperName ClassName)) [SourceType] Int 
ExpectedTypeConstructor (Qualified (ProperName ClassName)) [SourceType] SourceType 
InvalidNewtypeInstance (Qualified (ProperName ClassName)) [SourceType] 
MissingNewtypeSuperclassInstance (Qualified (ProperName ClassName)) (Qualified (ProperName ClassName)) [SourceType] 
UnverifiableSuperclassInstance (Qualified (ProperName ClassName)) (Qualified (ProperName ClassName)) [SourceType] 
CannotFindDerivingType (ProperName TypeName) 
DuplicateLabel Label (Maybe Expr) 
DuplicateValueDeclaration Ident 
ArgListLengthsDiffer Ident 
OverlappingArgNames (Maybe Ident) 
MissingClassMember (NonEmpty (Ident, SourceType)) 
ExtraneousClassMember Ident (Qualified (ProperName ClassName)) 
ExpectedType SourceType SourceKind 
IncorrectConstructorArity (Qualified (ProperName ConstructorName)) Int Int

constructor name, expected argument count, actual argument count

ExprDoesNotHaveType Expr SourceType 
PropertyIsMissing Label 
AdditionalProperty Label 
TypeSynonymInstance 
OrphanInstance Ident (Qualified (ProperName ClassName)) (Set ModuleName) [SourceType] 
InvalidNewtype (ProperName TypeName) 
InvalidInstanceHead SourceType 
TransitiveExportError DeclarationRef [DeclarationRef] 
TransitiveDctorExportError DeclarationRef (ProperName ConstructorName) 
ShadowedName Ident 
ShadowedTypeVar Text 
UnusedTypeVar Text 
WildcardInferredType SourceType Context 
HoleInferredType Text SourceType Context (Maybe TypeSearch) 
MissingTypeDeclaration Ident SourceType 
OverlappingPattern [[Binder]] Bool 
IncompleteExhaustivityCheck 
MisleadingEmptyTypeImport ModuleName (ProperName TypeName) 
ImportHidingModule ModuleName 
UnusedImport ModuleName 
UnusedExplicitImport ModuleName [Name] (Maybe ModuleName) [DeclarationRef] 
UnusedDctorImport ModuleName (ProperName TypeName) (Maybe ModuleName) [DeclarationRef] 
UnusedDctorExplicitImport ModuleName (ProperName TypeName) [ProperName ConstructorName] (Maybe ModuleName) [DeclarationRef] 
DuplicateSelectiveImport ModuleName 
DuplicateImport ModuleName ImportDeclarationType (Maybe ModuleName) 
DuplicateImportRef Name 
DuplicateExportRef Name 
IntOutOfRange Integer Text Integer Integer 
ImplicitQualifiedImport ModuleName ModuleName [DeclarationRef] 
ImplicitQualifiedImportReExport ModuleName ModuleName [DeclarationRef] 
ImplicitImport ModuleName [DeclarationRef] 
HidingImport ModuleName [DeclarationRef] 
CaseBinderLengthDiffers Int [Binder] 
IncorrectAnonymousArgument 
InvalidOperatorInBinder (Qualified (OpName ValueOpName)) (Qualified Ident) 
CannotGeneralizeRecursiveFunction Ident SourceType 
CannotDeriveNewtypeForData (ProperName TypeName) 
ExpectedWildcard (ProperName TypeName) 
CannotUseBindWithDo Ident 
ClassInstanceArityMismatch Ident (Qualified (ProperName ClassName)) Int Int

instance name, type class, expected argument count, actual argument count

UserDefinedWarning SourceType

a user-defined warning raised by using the Warn type class

UnusableDeclaration Ident [[Text]]

a declaration couldn't be used because it contained free variables

CannotDefinePrimModules ModuleName 
MixedAssociativityError (NonEmpty (Qualified (OpName AnyOpName), Associativity)) 
NonAssociativeError (NonEmpty (Qualified (OpName AnyOpName))) 

data Module Source #

A module declaration, consisting of comments about the module, a module name, a list of declarations, and a list of the declarations that are explicitly exported. If the export list is Nothing, everything is exported.

Instances
Show Module Source # 
Instance details

Defined in Language.PureScript.AST.Declarations

getModuleName :: Module -> ModuleName Source #

Return a module's name.

getModuleSourceSpan :: Module -> SourceSpan Source #

Return a module's source span.

getModuleDeclarations :: Module -> [Declaration] Source #

Return a module's declarations.

addDefaultImport :: Qualified ModuleName -> Module -> Module Source #

Add an import declaration for a module if it does not already explicitly import it.

Will not import an unqualified module if that module has already been imported qualified. (See #2197)

importPrim :: Module -> Module Source #

Adds import declarations to a module for an implicit Prim import and Prim | qualified as Prim, as necessary.

data DeclarationRef Source #

An item in a list of explicit imports or exports

Constructors

TypeRef SourceSpan (ProperName TypeName) (Maybe [ProperName ConstructorName])

A type constructor with data constructors

TypeOpRef SourceSpan (OpName TypeOpName)

A type operator

ValueRef SourceSpan Ident

A value

ValueOpRef SourceSpan (OpName ValueOpName)

A value-level operator

TypeClassRef SourceSpan (ProperName ClassName)

A type class

TypeInstanceRef SourceSpan Ident

A type class instance, created during typeclass desugaring (name, class name, instance types)

ModuleRef SourceSpan ModuleName

A module, in its entirety

KindRef SourceSpan (ProperName KindName)

A named kind

ReExportRef SourceSpan ExportSource DeclarationRef

A value re-exported from another module. These will be inserted during elaboration in name desugaring.

Instances
Eq DeclarationRef Source # 
Instance details

Defined in Language.PureScript.AST.Declarations

Show DeclarationRef Source # 
Instance details

Defined in Language.PureScript.AST.Declarations

Generic DeclarationRef Source # 
Instance details

Defined in Language.PureScript.AST.Declarations

Associated Types

type Rep DeclarationRef :: Type -> Type #

NFData DeclarationRef Source # 
Instance details

Defined in Language.PureScript.AST.Declarations

Methods

rnf :: DeclarationRef -> () #

ToJSON DeclarationRef Source # 
Instance details

Defined in Language.PureScript.AST.Declarations

FromJSON DeclarationRef Source # 
Instance details

Defined in Language.PureScript.AST.Declarations

type Rep DeclarationRef Source # 
Instance details

Defined in Language.PureScript.AST.Declarations

type Rep DeclarationRef = D1 (MetaData "DeclarationRef" "Language.PureScript.AST.Declarations" "purescript-0.13.2-3QkFEXX4DzwIft0Bgxs9Xq" False) (((C1 (MetaCons "TypeRef" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 SourceSpan) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (ProperName TypeName)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe [ProperName ConstructorName])))) :+: C1 (MetaCons "TypeOpRef" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 SourceSpan) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (OpName TypeOpName)))) :+: (C1 (MetaCons "ValueRef" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 SourceSpan) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident)) :+: C1 (MetaCons "ValueOpRef" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 SourceSpan) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (OpName ValueOpName))))) :+: ((C1 (MetaCons "TypeClassRef" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 SourceSpan) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (ProperName ClassName))) :+: C1 (MetaCons "TypeInstanceRef" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 SourceSpan) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Ident))) :+: (C1 (MetaCons "ModuleRef" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 SourceSpan) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ModuleName)) :+: (C1 (MetaCons "KindRef" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 SourceSpan) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (ProperName KindName))) :+: C1 (MetaCons "ReExportRef" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 SourceSpan) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ExportSource) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 DeclarationRef)))))))

data ExportSource Source #

Instances
Eq ExportSource Source # 
Instance details

Defined in Language.PureScript.AST.Declarations

Ord ExportSource Source # 
Instance details

Defined in Language.PureScript.AST.Declarations

Show ExportSource Source # 
Instance details

Defined in Language.PureScript.AST.Declarations

Generic ExportSource Source # 
Instance details

Defined in Language.PureScript.AST.Declarations

Associated Types

type Rep ExportSource :: Type -> Type #

NFData ExportSource Source # 
Instance details

Defined in Language.PureScript.AST.Declarations

Methods

rnf :: ExportSource -> () #

ToJSON ExportSource Source # 
Instance details

Defined in Language.PureScript.AST.Declarations

FromJSON ExportSource Source # 
Instance details

Defined in Language.PureScript.AST.Declarations

type Rep ExportSource Source # 
Instance details

Defined in Language.PureScript.AST.Declarations

type Rep ExportSource = D1 (MetaData "ExportSource" "Language.PureScript.AST.Declarations" "purescript-0.13.2-3QkFEXX4DzwIft0Bgxs9Xq" False) (C1 (MetaCons "ExportSource" PrefixI True) (S1 (MetaSel (Just "exportSourceImportedFrom") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe ModuleName)) :*: S1 (MetaSel (Just "exportSourceDefinedIn") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ModuleName)))

data ImportDeclarationType Source #

The data type which specifies type of import declaration

Constructors

Implicit

An import with no explicit list: `import M`.

Explicit [DeclarationRef]

An import with an explicit list of references to import: `import M (foo)`

Hiding [DeclarationRef]

An import with a list of references to hide: `import M hiding (foo)`

data TypeDeclarationData Source #

A type declaration assigns a type to an identifier, eg:

identity :: forall a. a -> a

In this example identity is the identifier and forall a. a -> a the type.

data ValueDeclarationData a Source #

A value declaration assigns a name and potential binders, to an expression (or multiple guarded expressions).

double x = x + x

In this example double is the identifier, x is a binder and x + x is the expression.

Constructors

ValueDeclarationData 

Fields

Instances
Functor ValueDeclarationData Source # 
Instance details

Defined in Language.PureScript.AST.Declarations

Foldable ValueDeclarationData Source # 
Instance details

Defined in Language.PureScript.AST.Declarations

Methods

fold :: Monoid m => ValueDeclarationData m -> m #

foldMap :: Monoid m => (a -> m) -> ValueDeclarationData a -> m #

foldr :: (a -> b -> b) -> b -> ValueDeclarationData a -> b #

foldr' :: (a -> b -> b) -> b -> ValueDeclarationData a -> b #

foldl :: (b -> a -> b) -> b -> ValueDeclarationData a -> b #

foldl' :: (b -> a -> b) -> b -> ValueDeclarationData a -> b #

foldr1 :: (a -> a -> a) -> ValueDeclarationData a -> a #

foldl1 :: (a -> a -> a) -> ValueDeclarationData a -> a #

toList :: ValueDeclarationData a -> [a] #

null :: ValueDeclarationData a -> Bool #

length :: ValueDeclarationData a -> Int #

elem :: Eq a => a -> ValueDeclarationData a -> Bool #

maximum :: Ord a => ValueDeclarationData a -> a #

minimum :: Ord a => ValueDeclarationData a -> a #

sum :: Num a => ValueDeclarationData a -> a #

product :: Num a => ValueDeclarationData a -> a #

Traversable ValueDeclarationData Source # 
Instance details

Defined in Language.PureScript.AST.Declarations

Show a => Show (ValueDeclarationData a) Source # 
Instance details

Defined in Language.PureScript.AST.Declarations

data Declaration Source #

The data type of declarations

Constructors

DataDeclaration SourceAnn DataDeclType (ProperName TypeName) [(Text, Maybe SourceKind)] [(ProperName ConstructorName, [(Ident, SourceType)])]

A data type declaration (data or newtype, name, arguments, data constructors)

DataBindingGroupDeclaration (NonEmpty Declaration)

A minimal mutually recursive set of data type declarations

TypeSynonymDeclaration SourceAnn (ProperName TypeName) [(Text, Maybe SourceKind)] SourceType

A type synonym declaration (name, arguments, type)

TypeDeclaration !TypeDeclarationData

A type declaration for a value (name, ty)

ValueDeclaration !(ValueDeclarationData [GuardedExpr])

A value declaration (name, top-level binders, optional guard, value)

BoundValueDeclaration SourceAnn Binder Expr

A declaration paired with pattern matching in let-in expression (binder, optional guard, value)

BindingGroupDeclaration (NonEmpty ((SourceAnn, Ident), NameKind, Expr))

A minimal mutually recursive set of value declarations

ExternDeclaration SourceAnn Ident SourceType

A foreign import declaration (name, type)

ExternDataDeclaration SourceAnn (ProperName TypeName) SourceKind

A data type foreign import (name, kind)

ExternKindDeclaration SourceAnn (ProperName KindName)

A foreign kind import (name)

FixityDeclaration SourceAnn (Either ValueFixity TypeFixity)

A fixity declaration

ImportDeclaration SourceAnn ModuleName ImportDeclarationType (Maybe ModuleName)

A module import (module name, qualifiedunqualifiedhiding, optional "qualified as" name)

TypeClassDeclaration SourceAnn (ProperName ClassName) [(Text, Maybe SourceKind)] [SourceConstraint] [FunctionalDependency] [Declaration]

A type class declaration (name, argument, implies, member declarations)

TypeInstanceDeclaration SourceAnn [Ident] Integer Ident [SourceConstraint] (Qualified (ProperName ClassName)) [SourceType] TypeInstanceBody

A type instance declaration (instance chain, chain index, name, dependencies, class name, instance types, member declarations)

data TypeInstanceBody Source #

The members of a type class instance declaration

Constructors

DerivedInstance

This is a derived instance

NewtypeInstance

This is an instance derived from a newtype

NewtypeInstanceWithDictionary Expr

This is an instance derived from a newtype, desugared to include a dictionary for the type under the newtype.

ExplicitInstance [Declaration]

This is a regular (explicit) instance

traverseTypeInstanceBody :: Applicative f => ([Declaration] -> f [Declaration]) -> TypeInstanceBody -> f TypeInstanceBody Source #

A traversal for TypeInstanceBody

isValueDecl :: Declaration -> Bool Source #

Test if a declaration is a value declaration

isDataDecl :: Declaration -> Bool Source #

Test if a declaration is a data type or type synonym declaration

isImportDecl :: Declaration -> Bool Source #

Test if a declaration is a module import

isExternDataDecl :: Declaration -> Bool Source #

Test if a declaration is a data type foreign import

isExternKindDecl :: Declaration -> Bool Source #

Test if a declaration is a foreign kind import

isFixityDecl :: Declaration -> Bool Source #

Test if a declaration is a fixity declaration

isExternDecl :: Declaration -> Bool Source #

Test if a declaration is a foreign import

isTypeClassInstanceDeclaration :: Declaration -> Bool Source #

Test if a declaration is a type class instance declaration

isTypeClassDeclaration :: Declaration -> Bool Source #

Test if a declaration is a type class declaration

flattenDecls :: [Declaration] -> [Declaration] Source #

Recursively flatten data binding groups in the list of declarations

data Guard Source #

A guard is just a boolean-valued expression that appears alongside a set of binders

Instances
Show Guard Source # 
Instance details

Defined in Language.PureScript.AST.Declarations

Methods

showsPrec :: Int -> Guard -> ShowS #

show :: Guard -> String #

showList :: [Guard] -> ShowS #

data GuardedExpr Source #

The right hand side of a binder in value declarations and case expressions.

Constructors

GuardedExpr [Guard] Expr 

data Expr Source #

Data type for expressions and terms

Constructors

Literal SourceSpan (Literal Expr)

A literal value

UnaryMinus SourceSpan Expr

A prefix -, will be desugared

BinaryNoParens Expr Expr Expr

Binary operator application. During the rebracketing phase of desugaring, this data constructor will be removed.

Parens Expr

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.

Accessor PSString Expr

An record property accessor expression (e.g. `obj.x` or `_.x`). Anonymous arguments will be removed during desugaring and expanded into a lambda that reads a property from a record.

ObjectUpdate Expr [(PSString, Expr)]

Partial record update

ObjectUpdateNested Expr (PathTree Expr)

Object updates with nested support: `x { foo { bar = e } }` Replaced during desugaring into a Let and nested ObjectUpdates

Abs Binder Expr

Function introduction

App Expr Expr

Function application

Var SourceSpan (Qualified Ident)

Variable

Op SourceSpan (Qualified (OpName ValueOpName))

An operator. This will be desugared into a function during the "operators" phase of desugaring.

IfThenElse Expr Expr Expr

Conditional (if-then-else expression)

Constructor SourceSpan (Qualified (ProperName ConstructorName))

A data constructor

Case [Expr] [CaseAlternative]

A case expression. During the case expansion phase of desugaring, top-level binders will get desugared into case expressions, hence the need for guards and multiple binders per branch here.

TypedValue Bool Expr SourceType

A value with a type annotation

Let WhereProvenance [Declaration] Expr

A let binding

Do (Maybe ModuleName) [DoNotationElement]

A do-notation block

Ado (Maybe ModuleName) [DoNotationElement] Expr

An ado-notation block

TypeClassDictionaryConstructorApp (Qualified (ProperName ClassName)) Expr

An application of a typeclass dictionary constructor. The value should be an ObjectLiteral.

TypeClassDictionary SourceConstraint (Map (Maybe ModuleName) (Map (Qualified (ProperName ClassName)) (Map (Qualified Ident) (NonEmpty NamedDict)))) [ErrorMessageHint]

A placeholder for a type class dictionary to be inserted later. At the end of type checking, these placeholders will be replaced with actual expressions representing type classes dictionaries which can be evaluated at runtime. The constructor arguments represent (in order): whether or not to look at superclass implementations when searching for a dictionary, the type class name and instance type, and the type class dictionaries in scope.

TypeClassDictionaryAccessor (Qualified (ProperName ClassName)) Ident

A typeclass dictionary accessor, the implementation is left unspecified until CoreFn desugaring.

DeferredDictionary (Qualified (ProperName ClassName)) [SourceType]

A placeholder for a superclass dictionary to be turned into a TypeClassDictionary during typechecking

AnonymousArgument

A placeholder for an anonymous function argument

Hole Text

A typed hole that will be turned into a hint/error during typechecking

PositionedValue SourceSpan [Comment] Expr

A value with source position information

Instances
Show Expr Source # 
Instance details

Defined in Language.PureScript.AST.Declarations

Methods

showsPrec :: Int -> Expr -> ShowS #

show :: Expr -> String #

showList :: [Expr] -> ShowS #

data WhereProvenance Source #

Metadata that tells where a let binding originated

Constructors

FromWhere

The let binding was originally a where clause

FromLet

The let binding was always a let binding

data CaseAlternative Source #

An alternative in a case statement

Constructors

CaseAlternative 

Fields

data DoNotationElement Source #

A statement in a do-notation block

Constructors

DoNotationValue Expr

A monadic value without a binder

DoNotationBind Binder Expr

A monadic value with a binder

DoNotationLet [Declaration]

A let statement, i.e. a pure value with a binder

PositionedDoNotationElement SourceSpan [Comment] DoNotationElement

A do notation element with source position information

newtype PathTree t Source #

Constructors

PathTree (AssocList PSString (PathNode t)) 
Instances
Functor PathTree Source # 
Instance details

Defined in Language.PureScript.AST.Declarations

Methods

fmap :: (a -> b) -> PathTree a -> PathTree b #

(<$) :: a -> PathTree b -> PathTree a #

Foldable PathTree Source # 
Instance details

Defined in Language.PureScript.AST.Declarations

Methods

fold :: Monoid m => PathTree m -> m #

foldMap :: Monoid m => (a -> m) -> PathTree a -> m #

foldr :: (a -> b -> b) -> b -> PathTree a -> b #

foldr' :: (a -> b -> b) -> b -> PathTree a -> b #

foldl :: (b -> a -> b) -> b -> PathTree a -> b #

foldl' :: (b -> a -> b) -> b -> PathTree a -> b #

foldr1 :: (a -> a -> a) -> PathTree a -> a #

foldl1 :: (a -> a -> a) -> PathTree a -> a #

toList :: PathTree a -> [a] #

null :: PathTree a -> Bool #

length :: PathTree a -> Int #

elem :: Eq a => a -> PathTree a -> Bool #

maximum :: Ord a => PathTree a -> a #

minimum :: Ord a => PathTree a -> a #

sum :: Num a => PathTree a -> a #

product :: Num a => PathTree a -> a #

Traversable PathTree Source # 
Instance details

Defined in Language.PureScript.AST.Declarations

Methods

traverse :: Applicative f => (a -> f b) -> PathTree a -> f (PathTree b) #

sequenceA :: Applicative f => PathTree (f a) -> f (PathTree a) #

mapM :: Monad m => (a -> m b) -> PathTree a -> m (PathTree b) #

sequence :: Monad m => PathTree (m a) -> m (PathTree a) #

Eq t => Eq (PathTree t) Source # 
Instance details

Defined in Language.PureScript.AST.Declarations

Methods

(==) :: PathTree t -> PathTree t -> Bool #

(/=) :: PathTree t -> PathTree t -> Bool #

Ord t => Ord (PathTree t) Source # 
Instance details

Defined in Language.PureScript.AST.Declarations

Methods

compare :: PathTree t -> PathTree t -> Ordering #

(<) :: PathTree t -> PathTree t -> Bool #

(<=) :: PathTree t -> PathTree t -> Bool #

(>) :: PathTree t -> PathTree t -> Bool #

(>=) :: PathTree t -> PathTree t -> Bool #

max :: PathTree t -> PathTree t -> PathTree t #

min :: PathTree t -> PathTree t -> PathTree t #

Show t => Show (PathTree t) Source # 
Instance details

Defined in Language.PureScript.AST.Declarations

Methods

showsPrec :: Int -> PathTree t -> ShowS #

show :: PathTree t -> String #

showList :: [PathTree t] -> ShowS #

data PathNode t Source #

Constructors

Leaf t 
Branch (PathTree t) 
Instances
Functor PathNode Source # 
Instance details

Defined in Language.PureScript.AST.Declarations

Methods

fmap :: (a -> b) -> PathNode a -> PathNode b #

(<$) :: a -> PathNode b -> PathNode a #

Foldable PathNode Source # 
Instance details

Defined in Language.PureScript.AST.Declarations

Methods

fold :: Monoid m => PathNode m -> m #

foldMap :: Monoid m => (a -> m) -> PathNode a -> m #

foldr :: (a -> b -> b) -> b -> PathNode a -> b #

foldr' :: (a -> b -> b) -> b -> PathNode a -> b #

foldl :: (b -> a -> b) -> b -> PathNode a -> b #

foldl' :: (b -> a -> b) -> b -> PathNode a -> b #

foldr1 :: (a -> a -> a) -> PathNode a -> a #

foldl1 :: (a -> a -> a) -> PathNode a -> a #

toList :: PathNode a -> [a] #

null :: PathNode a -> Bool #

length :: PathNode a -> Int #

elem :: Eq a => a -> PathNode a -> Bool #

maximum :: Ord a => PathNode a -> a #

minimum :: Ord a => PathNode a -> a #

sum :: Num a => PathNode a -> a #

product :: Num a => PathNode a -> a #

Traversable PathNode Source # 
Instance details

Defined in Language.PureScript.AST.Declarations

Methods

traverse :: Applicative f => (a -> f b) -> PathNode a -> f (PathNode b) #

sequenceA :: Applicative f => PathNode (f a) -> f (PathNode a) #

mapM :: Monad m => (a -> m b) -> PathNode a -> m (PathNode b) #

sequence :: Monad m => PathNode (m a) -> m (PathNode a) #

Eq t => Eq (PathNode t) Source # 
Instance details

Defined in Language.PureScript.AST.Declarations

Methods

(==) :: PathNode t -> PathNode t -> Bool #

(/=) :: PathNode t -> PathNode t -> Bool #

Ord t => Ord (PathNode t) Source # 
Instance details

Defined in Language.PureScript.AST.Declarations

Methods

compare :: PathNode t -> PathNode t -> Ordering #

(<) :: PathNode t -> PathNode t -> Bool #

(<=) :: PathNode t -> PathNode t -> Bool #

(>) :: PathNode t -> PathNode t -> Bool #

(>=) :: PathNode t -> PathNode t -> Bool #

max :: PathNode t -> PathNode t -> PathNode t #

min :: PathNode t -> PathNode t -> PathNode t #

Show t => Show (PathNode t) Source # 
Instance details

Defined in Language.PureScript.AST.Declarations

Methods

showsPrec :: Int -> PathNode t -> ShowS #

show :: PathNode t -> String #

showList :: [PathNode t] -> ShowS #

newtype AssocList k t Source #

Constructors

AssocList 

Fields

Instances
Functor (AssocList k) Source # 
Instance details

Defined in Language.PureScript.AST.Declarations

Methods

fmap :: (a -> b) -> AssocList k a -> AssocList k b #

(<$) :: a -> AssocList k b -> AssocList k a #

Foldable (AssocList k) Source # 
Instance details

Defined in Language.PureScript.AST.Declarations

Methods

fold :: Monoid m => AssocList k m -> m #

foldMap :: Monoid m => (a -> m) -> AssocList k a -> m #

foldr :: (a -> b -> b) -> b -> AssocList k a -> b #

foldr' :: (a -> b -> b) -> b -> AssocList k a -> b #

foldl :: (b -> a -> b) -> b -> AssocList k a -> b #

foldl' :: (b -> a -> b) -> b -> AssocList k a -> b #

foldr1 :: (a -> a -> a) -> AssocList k a -> a #

foldl1 :: (a -> a -> a) -> AssocList k a -> a #

toList :: AssocList k a -> [a] #

null :: AssocList k a -> Bool #

length :: AssocList k a -> Int #

elem :: Eq a => a -> AssocList k a -> Bool #

maximum :: Ord a => AssocList k a -> a #

minimum :: Ord a => AssocList k a -> a #

sum :: Num a => AssocList k a -> a #

product :: Num a => AssocList k a -> a #

Traversable (AssocList k) Source # 
Instance details

Defined in Language.PureScript.AST.Declarations

Methods

traverse :: Applicative f => (a -> f b) -> AssocList k a -> f (AssocList k b) #

sequenceA :: Applicative f => AssocList k (f a) -> f (AssocList k a) #

mapM :: Monad m => (a -> m b) -> AssocList k a -> m (AssocList k b) #

sequence :: Monad m => AssocList k (m a) -> m (AssocList k a) #

(Eq k, Eq t) => Eq (AssocList k t) Source # 
Instance details

Defined in Language.PureScript.AST.Declarations

Methods

(==) :: AssocList k t -> AssocList k t -> Bool #

(/=) :: AssocList k t -> AssocList k t -> Bool #

(Ord k, Ord t) => Ord (AssocList k t) Source # 
Instance details

Defined in Language.PureScript.AST.Declarations

Methods

compare :: AssocList k t -> AssocList k t -> Ordering #

(<) :: AssocList k t -> AssocList k t -> Bool #

(<=) :: AssocList k t -> AssocList k t -> Bool #

(>) :: AssocList k t -> AssocList k t -> Bool #

(>=) :: AssocList k t -> AssocList k t -> Bool #

max :: AssocList k t -> AssocList k t -> AssocList k t #

min :: AssocList k t -> AssocList k t -> AssocList k t #

(Show k, Show t) => Show (AssocList k t) Source # 
Instance details

Defined in Language.PureScript.AST.Declarations

Methods

showsPrec :: Int -> AssocList k t -> ShowS #

show :: AssocList k t -> String #

showList :: [AssocList k t] -> ShowS #