purescript-0.15.15: PureScript Programming Language Compiler

Safe Haskell | None
Language | Haskell2010

Language.PureScript.AST.Declarations

Description

Data types for modules and declarations

Synopsis

- type Context = [(Ident, SourceType)]
- data TypeSearch
  - = TSBefore Environment
  - | TSAfter {
    - tsAfterIdentifiers :: [(Qualified Text, SourceType)]
    - tsAfterRecordFields :: Maybe [(Label, SourceType)]
    }
- onTypeSearchTypes :: (SourceType -> SourceType) -> TypeSearch -> TypeSearch
- onTypeSearchTypesM :: Applicative m => (SourceType -> m SourceType) -> TypeSearch -> m TypeSearch
- data ErrorMessageHint
  - = ErrorUnifyingTypes SourceType SourceType
  - | ErrorInExpression Expr
  - | ErrorInModule ModuleName
  - | ErrorInInstance (Qualified (ProperName 'ClassName)) [SourceType]
  - | ErrorInSubsumption SourceType SourceType
  - | ErrorInRowLabel Label
  - | ErrorCheckingAccessor Expr PSString
  - | ErrorCheckingType Expr SourceType
  - | ErrorCheckingKind SourceType SourceType
  - | ErrorCheckingGuard
  - | ErrorInferringType Expr
  - | ErrorInferringKind SourceType
  - | ErrorInApplication Expr SourceType Expr
  - | ErrorInDataConstructor (ProperName 'ConstructorName)
  - | ErrorInTypeConstructor (ProperName 'TypeName)
  - | ErrorInBindingGroup (NonEmpty Ident)
  - | ErrorInDataBindingGroup [ProperName 'TypeName]
  - | ErrorInTypeSynonym (ProperName 'TypeName)
  - | ErrorInValueDeclaration Ident
  - | ErrorInTypeDeclaration Ident
  - | ErrorInTypeClassDeclaration (ProperName 'ClassName)
  - | ErrorInKindDeclaration (ProperName 'TypeName)
  - | ErrorInRoleDeclaration (ProperName 'TypeName)
  - | ErrorInForeignImport Ident
  - | ErrorInForeignImportData (ProperName 'TypeName)
  - | ErrorSolvingConstraint SourceConstraint
  - | MissingConstructorImportForCoercible (Qualified (ProperName 'ConstructorName))
  - | PositionedError (NonEmpty SourceSpan)
  - | RelatedPositions (NonEmpty SourceSpan)
- data HintCategory
  - = ExprHint
  - | KindHint
  - | CheckHint
  - | PositionHint
  - | SolverHint
  - | DeclarationHint
  - | OtherHint
- data UnknownsHint
  - = NoUnknowns
  - | Unknowns
  - | UnknownsWithVtaRequiringArgs (NonEmpty (Qualified Ident, [[Text]]))
- data Module = Module SourceSpan [Comment] ModuleName [Declaration] (Maybe [DeclarationRef])
- getModuleName :: Module -> ModuleName
- getModuleSourceSpan :: Module -> SourceSpan
- getModuleDeclarations :: Module -> [Declaration]
- addDefaultImport :: Qualified ModuleName -> Module -> Module
- importPrim :: Module -> Module
- data NameSource
  - = UserNamed
  - | CompilerNamed
- data DeclarationRef
  - = TypeClassRef SourceSpan (ProperName 'ClassName)
  - | TypeOpRef SourceSpan (OpName 'TypeOpName)
  - | TypeRef SourceSpan (ProperName 'TypeName) (Maybe [ProperName 'ConstructorName])
  - | ValueRef SourceSpan Ident
  - | ValueOpRef SourceSpan (OpName 'ValueOpName)
  - | TypeInstanceRef SourceSpan Ident NameSource
  - | ModuleRef SourceSpan ModuleName
  - | ReExportRef SourceSpan ExportSource DeclarationRef
- data ExportSource = ExportSource {
  - exportSourceImportedFrom :: Maybe ModuleName
  - exportSourceDefinedIn :: ModuleName
  }
- declRefSourceSpan :: DeclarationRef -> SourceSpan
- declRefName :: DeclarationRef -> Name
- getTypeRef :: DeclarationRef -> Maybe (ProperName 'TypeName, Maybe [ProperName 'ConstructorName])
- getTypeOpRef :: DeclarationRef -> Maybe (OpName 'TypeOpName)
- getValueRef :: DeclarationRef -> Maybe Ident
- getValueOpRef :: DeclarationRef -> Maybe (OpName 'ValueOpName)
- getTypeClassRef :: DeclarationRef -> Maybe (ProperName 'ClassName)
- isModuleRef :: DeclarationRef -> Bool
- data ImportDeclarationType
  - = Implicit
  - | Explicit [DeclarationRef]
  - | Hiding [DeclarationRef]
- isExplicit :: ImportDeclarationType -> Bool
- data RoleDeclarationData = RoleDeclarationData {
  - rdeclSourceAnn :: !SourceAnn
  - rdeclIdent :: !(ProperName 'TypeName)
  - rdeclRoles :: ![Role]
  }
- data TypeDeclarationData = TypeDeclarationData {
  - tydeclSourceAnn :: !SourceAnn
  - tydeclIdent :: !Ident
  - tydeclType :: !SourceType
  }
- getTypeDeclaration :: Declaration -> Maybe TypeDeclarationData
- unwrapTypeDeclaration :: TypeDeclarationData -> (Ident, SourceType)
- data ValueDeclarationData a = ValueDeclarationData {
  - valdeclSourceAnn :: !SourceAnn
  - valdeclIdent :: !Ident
  - valdeclName :: !NameKind
  - valdeclBinders :: ![Binder]
  - valdeclExpression :: !a
  }
- getValueDeclaration :: Declaration -> Maybe (ValueDeclarationData [GuardedExpr])
- pattern ValueDecl :: SourceAnn -> Ident -> NameKind -> [Binder] -> [GuardedExpr] -> Declaration
- data DataConstructorDeclaration = DataConstructorDeclaration {
  - dataCtorAnn :: !SourceAnn
  - dataCtorName :: !(ProperName 'ConstructorName)
  - dataCtorFields :: ![(Ident, SourceType)]
  }
- mapDataCtorFields :: ([(Ident, SourceType)] -> [(Ident, SourceType)]) -> DataConstructorDeclaration -> DataConstructorDeclaration
- traverseDataCtorFields :: Monad m => ([(Ident, SourceType)] -> m [(Ident, SourceType)]) -> DataConstructorDeclaration -> m DataConstructorDeclaration
- data Declaration
  - = DataDeclaration SourceAnn DataDeclType (ProperName 'TypeName) [(Text, Maybe SourceType)] [DataConstructorDeclaration]
  - | DataBindingGroupDeclaration (NonEmpty Declaration)
  - | TypeSynonymDeclaration SourceAnn (ProperName 'TypeName) [(Text, Maybe SourceType)] SourceType
  - | KindDeclaration SourceAnn KindSignatureFor (ProperName 'TypeName) SourceType
  - | RoleDeclaration !RoleDeclarationData
  - | TypeDeclaration !TypeDeclarationData
  - | ValueDeclaration !(ValueDeclarationData [GuardedExpr])
  - | BoundValueDeclaration SourceAnn Binder Expr
  - | BindingGroupDeclaration (NonEmpty ((SourceAnn, Ident), NameKind, Expr))
  - | ExternDeclaration SourceAnn Ident SourceType
  - | ExternDataDeclaration SourceAnn (ProperName 'TypeName) SourceType
  - | FixityDeclaration SourceAnn (Either ValueFixity TypeFixity)
  - | ImportDeclaration SourceAnn ModuleName ImportDeclarationType (Maybe ModuleName)
  - | TypeClassDeclaration SourceAnn (ProperName 'ClassName) [(Text, Maybe SourceType)] [SourceConstraint] [FunctionalDependency] [Declaration]
  - | TypeInstanceDeclaration SourceAnn SourceAnn ChainId Integer (Either Text Ident) [SourceConstraint] (Qualified (ProperName 'ClassName)) [SourceType] TypeInstanceBody
- data ValueFixity = ValueFixity Fixity (Qualified (Either Ident (ProperName 'ConstructorName))) (OpName 'ValueOpName)
- data TypeFixity = TypeFixity Fixity (Qualified (ProperName 'TypeName)) (OpName 'TypeOpName)
- pattern ValueFixityDeclaration :: SourceAnn -> Fixity -> Qualified (Either Ident (ProperName 'ConstructorName)) -> OpName 'ValueOpName -> Declaration
- pattern TypeFixityDeclaration :: SourceAnn -> Fixity -> Qualified (ProperName 'TypeName) -> OpName 'TypeOpName -> Declaration
- data InstanceDerivationStrategy
  - = KnownClassStrategy
  - | NewtypeStrategy
- data TypeInstanceBody
  - = DerivedInstance
  - | NewtypeInstance
  - | ExplicitInstance [Declaration]
- mapTypeInstanceBody :: ([Declaration] -> [Declaration]) -> TypeInstanceBody -> TypeInstanceBody
- traverseTypeInstanceBody :: Applicative f => ([Declaration] -> f [Declaration]) -> TypeInstanceBody -> f TypeInstanceBody
- data KindSignatureFor
  - = DataSig
  - | NewtypeSig
  - | TypeSynonymSig
  - | ClassSig
- declSourceAnn :: Declaration -> SourceAnn
- declSourceSpan :: Declaration -> SourceSpan
- declName :: Declaration -> Maybe Name
- isValueDecl :: Declaration -> Bool
- isDataDecl :: Declaration -> Bool
- isTypeSynonymDecl :: Declaration -> Bool
- isImportDecl :: Declaration -> Bool
- isRoleDecl :: Declaration -> Bool
- isExternDataDecl :: Declaration -> Bool
- isFixityDecl :: Declaration -> Bool
- getFixityDecl :: Declaration -> Maybe (Either ValueFixity TypeFixity)
- isExternDecl :: Declaration -> Bool
- isTypeClassInstanceDecl :: Declaration -> Bool
- isTypeClassDecl :: Declaration -> Bool
- isKindDecl :: Declaration -> Bool
- flattenDecls :: [Declaration] -> [Declaration]
- data Guard
  - = ConditionGuard Expr
  - | PatternGuard Binder Expr
- data GuardedExpr = GuardedExpr [Guard] Expr
- pattern MkUnguarded :: Expr -> GuardedExpr
- data Expr
  - = Literal SourceSpan (Literal Expr)
  - | UnaryMinus SourceSpan Expr
  - | BinaryNoParens Expr Expr Expr
  - | Parens Expr
  - | Accessor PSString Expr
  - | ObjectUpdate Expr [(PSString, Expr)]
  - | ObjectUpdateNested Expr (PathTree Expr)
  - | Abs Binder Expr
  - | App Expr Expr
  - | VisibleTypeApp Expr SourceType
  - | Unused Expr
  - | Var SourceSpan (Qualified Ident)
  - | Op SourceSpan (Qualified (OpName 'ValueOpName))
  - | IfThenElse Expr Expr Expr
  - | Constructor SourceSpan (Qualified (ProperName 'ConstructorName))
  - | Case [Expr] [CaseAlternative]
  - | TypedValue Bool Expr SourceType
  - | Let WhereProvenance [Declaration] Expr
  - | Do (Maybe ModuleName) [DoNotationElement]
  - | Ado (Maybe ModuleName) [DoNotationElement] Expr
  - | TypeClassDictionary SourceConstraint (Map QualifiedBy (Map (Qualified (ProperName 'ClassName)) (Map (Qualified Ident) (NonEmpty NamedDict)))) [ErrorMessageHint]
  - | DeferredDictionary (Qualified (ProperName 'ClassName)) [SourceType]
  - | DerivedInstancePlaceholder (Qualified (ProperName 'ClassName)) InstanceDerivationStrategy
  - | AnonymousArgument
  - | Hole Text
  - | PositionedValue SourceSpan [Comment] Expr
- data WhereProvenance
  - = FromWhere
  - | FromLet
- data CaseAlternative = CaseAlternative {
  - caseAlternativeBinders :: [Binder]
  - caseAlternativeResult :: [GuardedExpr]
  }
- data DoNotationElement
  - = DoNotationValue Expr
  - | DoNotationBind Binder Expr
  - | DoNotationLet [Declaration]
  - | PositionedDoNotationElement SourceSpan [Comment] DoNotationElement
- newtype PathTree t = PathTree (AssocList PSString (PathNode t))
- data PathNode t
  - = Leaf t
  - | Branch (PathTree t)
- newtype AssocList k t = AssocList {
  - runAssocList :: [(k, t)]
  }
- isTrueExpr :: Expr -> Bool
- isAnonymousArgument :: Expr -> Bool

# Documentation

type Context = [(Ident, SourceType)] #

A map of locally-bound names in scope.

data TypeSearch #

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

- tsAfterIdentifiers :: [(Qualified Text, SourceType)]

  The identifiers that fully satisfy the subsumption check

- tsAfterRecordFields :: Maybe [(Label, SourceType)]

  Record fields that are available on the first argument to the typed hole

#### Instances

Instances details

NFData TypeSearch # |
Instance details Defined in Language.PureScript.AST.Declarations Methods rnf :: TypeSearch -> () #
Generic TypeSearch # |

Instance details

Defined in Language.PureScript.AST.Declarations

Associated Types

type Rep TypeSearch |

Instance details

Defined in Language.PureScript.AST.Declarations

type Rep TypeSearch = D1 ('MetaData "TypeSearch" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "TSBefore" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Environment)) :+: C1 ('MetaCons "TSAfter" 'PrefixI 'True) (S1 ('MetaSel ('Just "tsAfterIdentifiers") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Qualified Text, SourceType)]) :*: S1 ('MetaSel ('Just "tsAfterRecordFields") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [(Label, SourceType)]))))

Methods

from :: TypeSearch -> Rep TypeSearch x #

to :: Rep TypeSearch x -> TypeSearch #

Show TypeSearch # |
Instance details Defined in Language.PureScript.AST.Declarations Methods showsPrec :: Int -> TypeSearch -> ShowS # show :: TypeSearch -> String # showList :: [TypeSearch] -> ShowS #
type Rep TypeSearch # |

Instance details

Defined in Language.PureScript.AST.Declarations

type Rep TypeSearch = D1 ('MetaData "TypeSearch" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "TSBefore" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Environment)) :+: C1 ('MetaCons "TSAfter" 'PrefixI 'True) (S1 ('MetaSel ('Just "tsAfterIdentifiers") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Qualified Text, SourceType)]) :*: S1 ('MetaSel ('Just "tsAfterRecordFields") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [(Label, SourceType)]))))

onTypeSearchTypes :: (SourceType -> SourceType) -> TypeSearch -> TypeSearch #

onTypeSearchTypesM :: Applicative m => (SourceType -> m SourceType) -> TypeSearch -> m TypeSearch #

data ErrorMessageHint #

Error message hints, providing more detailed information about failure.

Constructors

ErrorUnifyingTypes SourceType SourceType |
ErrorInExpression Expr |
ErrorInModule ModuleName |
ErrorInInstance (Qualified (ProperName 'ClassName)) [SourceType] |
ErrorInSubsumption SourceType SourceType |
ErrorInRowLabel Label |
ErrorCheckingAccessor Expr PSString |
ErrorCheckingType Expr SourceType |
ErrorCheckingKind SourceType SourceType |
ErrorCheckingGuard |
ErrorInferringType Expr |
ErrorInferringKind SourceType |
ErrorInApplication Expr SourceType Expr |
ErrorInDataConstructor (ProperName 'ConstructorName) |
ErrorInTypeConstructor (ProperName 'TypeName) |
ErrorInBindingGroup (NonEmpty Ident) |
ErrorInDataBindingGroup [ProperName 'TypeName] |
ErrorInTypeSynonym (ProperName 'TypeName) |
ErrorInValueDeclaration Ident |
ErrorInTypeDeclaration Ident |
ErrorInTypeClassDeclaration (ProperName 'ClassName) |
ErrorInKindDeclaration (ProperName 'TypeName) |
ErrorInRoleDeclaration (ProperName 'TypeName) |
ErrorInForeignImport Ident |
ErrorInForeignImportData (ProperName 'TypeName) |
ErrorSolvingConstraint SourceConstraint |
MissingConstructorImportForCoercible (Qualified (ProperName 'ConstructorName)) |
PositionedError (NonEmpty SourceSpan) |
RelatedPositions (NonEmpty SourceSpan) |

#### Instances

Instances details

NFData ErrorMessageHint # |
Instance details Defined in Language.PureScript.AST.Declarations Methods rnf :: ErrorMessageHint -> () #
Generic ErrorMessageHint # |

Instance details

Defined in Language.PureScript.AST.Declarations

Associated Types

type Rep ErrorMessageHint |

Instance details

Defined in Language.PureScript.AST.Declarations

type Rep ErrorMessageHint = D1 ('MetaData "ErrorMessageHint" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) ((((C1 ('MetaCons "ErrorUnifyingTypes" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceType) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceType)) :+: (C1 ('MetaCons "ErrorInExpression" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr)) :+: C1 ('MetaCons "ErrorInModule" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ModuleName)))) :+: ((C1 ('MetaCons "ErrorInInstance" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Qualified (ProperName 'ClassName))) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [SourceType])) :+: C1 ('MetaCons "ErrorInSubsumption" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceType) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceType))) :+: (C1 ('MetaCons "ErrorInRowLabel" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Label)) :+: C1 ('MetaCons "ErrorCheckingAccessor" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PSString))))) :+: ((C1 ('MetaCons "ErrorCheckingType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceType)) :+: (C1 ('MetaCons "ErrorCheckingKind" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceType) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceType)) :+: C1 ('MetaCons "ErrorCheckingGuard" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ErrorInferringType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr)) :+: C1 ('MetaCons "ErrorInferringKind" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceType))) :+: (C1 ('MetaCons "ErrorInApplication" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceType) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr))) :+: C1 ('MetaCons "ErrorInDataConstructor" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ProperName 'ConstructorName))))))) :+: (((C1 ('MetaCons "ErrorInTypeConstructor" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ProperName 'TypeName))) :+: (C1 ('MetaCons "ErrorInBindingGroup" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty Ident))) :+: C1 ('MetaCons "ErrorInDataBindingGroup" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ProperName 'TypeName])))) :+: ((C1 ('MetaCons "ErrorInTypeSynonym" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ProperName 'TypeName))) :+: C1 ('MetaCons "ErrorInValueDeclaration" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ident))) :+: (C1 ('MetaCons "ErrorInTypeDeclaration" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ident)) :+: C1 ('MetaCons "ErrorInTypeClassDeclaration" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ProperName 'ClassName)))))) :+: (((C1 ('MetaCons "ErrorInKindDeclaration" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ProperName 'TypeName))) :+: C1 ('MetaCons "ErrorInRoleDeclaration" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ProperName 'TypeName)))) :+: (C1 ('MetaCons "ErrorInForeignImport" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ident)) :+: C1 ('MetaCons "ErrorInForeignImportData" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ProperName 'TypeName))))) :+: ((C1 ('MetaCons "ErrorSolvingConstraint" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceConstraint)) :+: C1 ('MetaCons "MissingConstructorImportForCoercible" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Qualified (ProperName 'ConstructorName))))) :+: (C1 ('MetaCons "PositionedError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty SourceSpan))) :+: C1 ('MetaCons "RelatedPositions" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty SourceSpan))))))))

Methods

from :: ErrorMessageHint -> Rep ErrorMessageHint x #

to :: Rep ErrorMessageHint x -> ErrorMessageHint #

Show ErrorMessageHint # |
Instance details Defined in Language.PureScript.AST.Declarations Methods showsPrec :: Int -> ErrorMessageHint -> ShowS # show :: ErrorMessageHint -> String # showList :: [ErrorMessageHint] -> ShowS #
type Rep ErrorMessageHint # |

Instance details

Defined in Language.PureScript.AST.Declarations

type Rep ErrorMessageHint = D1 ('MetaData "ErrorMessageHint" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) ((((C1 ('MetaCons "ErrorUnifyingTypes" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceType) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceType)) :+: (C1 ('MetaCons "ErrorInExpression" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr)) :+: C1 ('MetaCons "ErrorInModule" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ModuleName)))) :+: ((C1 ('MetaCons "ErrorInInstance" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Qualified (ProperName 'ClassName))) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [SourceType])) :+: C1 ('MetaCons "ErrorInSubsumption" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceType) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceType))) :+: (C1 ('MetaCons "ErrorInRowLabel" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Label)) :+: C1 ('MetaCons "ErrorCheckingAccessor" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PSString))))) :+: ((C1 ('MetaCons "ErrorCheckingType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceType)) :+: (C1 ('MetaCons "ErrorCheckingKind" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceType) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceType)) :+: C1 ('MetaCons "ErrorCheckingGuard" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ErrorInferringType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr)) :+: C1 ('MetaCons "ErrorInferringKind" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceType))) :+: (C1 ('MetaCons "ErrorInApplication" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceType) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr))) :+: C1 ('MetaCons "ErrorInDataConstructor" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ProperName 'ConstructorName))))))) :+: (((C1 ('MetaCons "ErrorInTypeConstructor" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ProperName 'TypeName))) :+: (C1 ('MetaCons "ErrorInBindingGroup" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty Ident))) :+: C1 ('MetaCons "ErrorInDataBindingGroup" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ProperName 'TypeName])))) :+: ((C1 ('MetaCons "ErrorInTypeSynonym" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ProperName 'TypeName))) :+: C1 ('MetaCons "ErrorInValueDeclaration" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ident))) :+: (C1 ('MetaCons "ErrorInTypeDeclaration" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ident)) :+: C1 ('MetaCons "ErrorInTypeClassDeclaration" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ProperName 'ClassName)))))) :+: (((C1 ('MetaCons "ErrorInKindDeclaration" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ProperName 'TypeName))) :+: C1 ('MetaCons "ErrorInRoleDeclaration" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ProperName 'TypeName)))) :+: (C1 ('MetaCons "ErrorInForeignImport" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ident)) :+: C1 ('MetaCons "ErrorInForeignImportData" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ProperName 'TypeName))))) :+: ((C1 ('MetaCons "ErrorSolvingConstraint" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceConstraint)) :+: C1 ('MetaCons "MissingConstructorImportForCoercible" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Qualified (ProperName 'ConstructorName))))) :+: (C1 ('MetaCons "PositionedError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty SourceSpan))) :+: C1 ('MetaCons "RelatedPositions" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty SourceSpan))))))))

data HintCategory #

Categories of hints

Constructors

ExprHint |
KindHint |
CheckHint |
PositionHint |
SolverHint |
DeclarationHint |
OtherHint |

#### Instances

Instances details

Show HintCategory # |
Instance details Defined in Language.PureScript.AST.Declarations Methods showsPrec :: Int -> HintCategory -> ShowS # show :: HintCategory -> String # showList :: [HintCategory] -> ShowS #
Eq HintCategory # |
Instance details Defined in Language.PureScript.AST.Declarations Methods (==) :: HintCategory -> HintCategory -> Bool # (/=) :: HintCategory -> HintCategory -> Bool #

data UnknownsHint #

In constraint solving, indicates whether there were `TypeUnknown`s that prevented an instance from being found, and whether VTAs are required due to type class members not referencing all the type class head's type variables.

Constructors

NoUnknowns |
Unknowns |
UnknownsWithVtaRequiringArgs (NonEmpty (Qualified Ident, [[Text]])) |

#### Instances

Instances details

NFData UnknownsHint # |
Instance details Defined in Language.PureScript.AST.Declarations Methods rnf :: UnknownsHint -> () #
Generic UnknownsHint # |

Instance details

Defined in Language.PureScript.AST.Declarations

Associated Types

type Rep UnknownsHint |

Instance details

Defined in Language.PureScript.AST.Declarations

type Rep UnknownsHint = D1 ('MetaData "UnknownsHint" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "NoUnknowns" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Unknowns" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "UnknownsWithVtaRequiringArgs" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty (Qualified Ident, [[Text]]))))))

Methods

from :: UnknownsHint -> Rep UnknownsHint x #

to :: Rep UnknownsHint x -> UnknownsHint #

Show UnknownsHint # |
Instance details Defined in Language.PureScript.AST.Declarations Methods showsPrec :: Int -> UnknownsHint -> ShowS # show :: UnknownsHint -> String # showList :: [UnknownsHint] -> ShowS #
type Rep UnknownsHint # |

Instance details

Defined in Language.PureScript.AST.Declarations

type Rep UnknownsHint = D1 ('MetaData "UnknownsHint" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "NoUnknowns" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Unknowns" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "UnknownsWithVtaRequiringArgs" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty (Qualified Ident, [[Text]]))))))

data Module #

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.

Constructors

Module SourceSpan [Comment] ModuleName [Declaration] (Maybe [DeclarationRef]) |

#### Instances

Instances details

Show Module # |
Instance details Defined in Language.PureScript.AST.Declarations Methods showsPrec :: Int -> Module -> ShowS # show :: Module -> String # showList :: [Module] -> ShowS #

getModuleName :: Module -> ModuleName #

Return a module's name.

getModuleSourceSpan :: Module -> SourceSpan #

Return a module's source span.

getModuleDeclarations :: Module -> [Declaration] #

Return a module's declarations.

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

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 #

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

data NameSource #

Constructors

UserNamed |
CompilerNamed |

#### Instances

Instances details

FromJSON NameSource # |
Instance details Defined in Language.PureScript.AST.Declarations Methods parseJSON :: Value -> Parser NameSource # parseJSONList :: Value -> Parser [NameSource] # omittedField :: Maybe NameSource #
ToJSON NameSource # |
Instance details Defined in Language.PureScript.AST.Declarations Methods toJSON :: NameSource -> Value # toEncoding :: NameSource -> Encoding # toJSONList :: [NameSource] -> Value # toEncodingList :: [NameSource] -> Encoding # omitField :: NameSource -> Bool #
NFData NameSource # |
Instance details Defined in Language.PureScript.AST.Declarations Methods rnf :: NameSource -> () #
Generic NameSource # |

Instance details

Defined in Language.PureScript.AST.Declarations

Associated Types

type Rep NameSource |
Instance details Defined in Language.PureScript.AST.Declarations type Rep NameSource = D1 ('MetaData "NameSource" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "UserNamed" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CompilerNamed" 'PrefixI 'False) (U1 :: Type -> Type))

Methods

from :: NameSource -> Rep NameSource x #

to :: Rep NameSource x -> NameSource #

Show NameSource # |
Instance details Defined in Language.PureScript.AST.Declarations Methods showsPrec :: Int -> NameSource -> ShowS # show :: NameSource -> String # showList :: [NameSource] -> ShowS #
Serialise NameSource # |
Instance details Defined in Language.PureScript.AST.Declarations Methods encode :: NameSource -> Encoding # decode :: Decoder s NameSource # encodeList :: [NameSource] -> Encoding # decodeList :: Decoder s [NameSource] #
type Rep NameSource # |
Instance details Defined in Language.PureScript.AST.Declarations type Rep NameSource = D1 ('MetaData "NameSource" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "UserNamed" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CompilerNamed" 'PrefixI 'False) (U1 :: Type -> Type))

data DeclarationRef #

An item in a list of explicit imports or exports

Constructors

TypeClassRef SourceSpan (ProperName 'ClassName) | A type class
TypeOpRef SourceSpan (OpName 'TypeOpName) | A type operator
TypeRef SourceSpan (ProperName 'TypeName) (Maybe [ProperName 'ConstructorName]) | A type constructor with data constructors
ValueRef SourceSpan Ident | A value
ValueOpRef SourceSpan (OpName 'ValueOpName) | A value-level operator
TypeInstanceRef SourceSpan Ident NameSource | A type class instance, created during typeclass desugaring
ModuleRef SourceSpan ModuleName | A module, in its entirety
ReExportRef SourceSpan ExportSource DeclarationRef | A value re-exported from another module. These will be inserted during elaboration in name desugaring.

#### Instances

Instances details

FromJSON DeclarationRef # |
Instance details Defined in Language.PureScript.AST.Declarations Methods parseJSON :: Value -> Parser DeclarationRef # parseJSONList :: Value -> Parser [DeclarationRef] # omittedField :: Maybe DeclarationRef #
ToJSON DeclarationRef # |
Instance details Defined in Language.PureScript.AST.Declarations Methods toJSON :: DeclarationRef -> Value # toEncoding :: DeclarationRef -> Encoding # toJSONList :: [DeclarationRef] -> Value # toEncodingList :: [DeclarationRef] -> Encoding # omitField :: DeclarationRef -> Bool #
NFData DeclarationRef # |
Instance details Defined in Language.PureScript.AST.Declarations Methods rnf :: DeclarationRef -> () #
Generic DeclarationRef # |

Instance details

Defined in Language.PureScript.AST.Declarations

Associated Types

type Rep DeclarationRef |

Instance details

Defined in Language.PureScript.AST.Declarations

type Rep DeclarationRef = D1 ('MetaData "DeclarationRef" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (((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 "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 "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 "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 "TypeInstanceRef" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceSpan) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ident) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NameSource)))) :+: (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 "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))))))

Methods

from :: DeclarationRef -> Rep DeclarationRef x #

to :: Rep DeclarationRef x -> DeclarationRef #

Show DeclarationRef # |
Instance details Defined in Language.PureScript.AST.Declarations Methods showsPrec :: Int -> DeclarationRef -> ShowS # show :: DeclarationRef -> String # showList :: [DeclarationRef] -> ShowS #
Eq DeclarationRef # |
Instance details Defined in Language.PureScript.AST.Declarations Methods (==) :: DeclarationRef -> DeclarationRef -> Bool # (/=) :: DeclarationRef -> DeclarationRef -> Bool #
Ord DeclarationRef # |

Instance details

Defined in Language.PureScript.AST.Declarations

Methods

compare :: DeclarationRef -> DeclarationRef -> Ordering #

(<) :: DeclarationRef -> DeclarationRef -> Bool #

(<=) :: DeclarationRef -> DeclarationRef -> Bool #

(>) :: DeclarationRef -> DeclarationRef -> Bool #

(>=) :: DeclarationRef -> DeclarationRef -> Bool #

max :: DeclarationRef -> DeclarationRef -> DeclarationRef #

min :: DeclarationRef -> DeclarationRef -> DeclarationRef #

Serialise DeclarationRef # |
Instance details Defined in Language.PureScript.AST.Declarations Methods encode :: DeclarationRef -> Encoding # decode :: Decoder s DeclarationRef # encodeList :: [DeclarationRef] -> Encoding # decodeList :: Decoder s [DeclarationRef] #
type Rep DeclarationRef # |

Instance details

Defined in Language.PureScript.AST.Declarations

type Rep DeclarationRef = D1 ('MetaData "DeclarationRef" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (((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 "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 "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 "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 "TypeInstanceRef" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceSpan) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ident) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NameSource)))) :+: (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 "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 #

Constructors

ExportSource |

Fields

- exportSourceImportedFrom :: Maybe ModuleName
- exportSourceDefinedIn :: ModuleName

#### Instances

Instances details

FromJSON ExportSource # |
Instance details Defined in Language.PureScript.AST.Declarations Methods parseJSON :: Value -> Parser ExportSource # parseJSONList :: Value -> Parser [ExportSource] # omittedField :: Maybe ExportSource #
ToJSON ExportSource # |
Instance details Defined in Language.PureScript.AST.Declarations Methods toJSON :: ExportSource -> Value # toEncoding :: ExportSource -> Encoding # toJSONList :: [ExportSource] -> Value # toEncodingList :: [ExportSource] -> Encoding # omitField :: ExportSource -> Bool #
NFData ExportSource # |
Instance details Defined in Language.PureScript.AST.Declarations Methods rnf :: ExportSource -> () #
Generic ExportSource # |

Instance details

Defined in Language.PureScript.AST.Declarations

Associated Types

type Rep ExportSource |

Instance details

Defined in Language.PureScript.AST.Declarations

type Rep ExportSource = D1 ('MetaData "ExportSource" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" '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)))

Methods

from :: ExportSource -> Rep ExportSource x #

to :: Rep ExportSource x -> ExportSource #

Show ExportSource # |
Instance details Defined in Language.PureScript.AST.Declarations Methods showsPrec :: Int -> ExportSource -> ShowS # show :: ExportSource -> String # showList :: [ExportSource] -> ShowS #
Eq ExportSource # |
Instance details Defined in Language.PureScript.AST.Declarations Methods (==) :: ExportSource -> ExportSource -> Bool # (/=) :: ExportSource -> ExportSource -> Bool #
Ord ExportSource # |

Instance details

Defined in Language.PureScript.AST.Declarations

Methods

compare :: ExportSource -> ExportSource -> Ordering #

(<) :: ExportSource -> ExportSource -> Bool #

(<=) :: ExportSource -> ExportSource -> Bool #

(>) :: ExportSource -> ExportSource -> Bool #

(>=) :: ExportSource -> ExportSource -> Bool #

max :: ExportSource -> ExportSource -> ExportSource #

min :: ExportSource -> ExportSource -> ExportSource #

Serialise ExportSource # |
Instance details Defined in Language.PureScript.AST.Declarations Methods encode :: ExportSource -> Encoding # decode :: Decoder s ExportSource # encodeList :: [ExportSource] -> Encoding # decodeList :: Decoder s [ExportSource] #
type Rep ExportSource # |

Instance details

Defined in Language.PureScript.AST.Declarations

type Rep ExportSource = D1 ('MetaData "ExportSource" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" '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)))

declRefSourceSpan :: DeclarationRef -> SourceSpan #

declRefName :: DeclarationRef -> Name #

getTypeRef :: DeclarationRef -> Maybe (ProperName 'TypeName, Maybe [ProperName 'ConstructorName]) #

getTypeOpRef :: DeclarationRef -> Maybe (OpName 'TypeOpName) #

getValueRef :: DeclarationRef -> Maybe Ident #

getValueOpRef :: DeclarationRef -> Maybe (OpName 'ValueOpName) #

getTypeClassRef :: DeclarationRef -> Maybe (ProperName 'ClassName) #

isModuleRef :: DeclarationRef -> Bool #

data ImportDeclarationType #

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)`

#### Instances

Instances details

FromJSON ImportDeclarationType # |
Instance details Defined in Language.PureScript.AST.Declarations Methods parseJSON :: Value -> Parser ImportDeclarationType # parseJSONList :: Value -> Parser [ImportDeclarationType] # omittedField :: Maybe ImportDeclarationType #
ToJSON ImportDeclarationType # |
Instance details Defined in Language.PureScript.AST.Declarations Methods toJSON :: ImportDeclarationType -> Value # toEncoding :: ImportDeclarationType -> Encoding # toJSONList :: [ImportDeclarationType] -> Value # toEncodingList :: [ImportDeclarationType] -> Encoding # omitField :: ImportDeclarationType -> Bool #
NFData ImportDeclarationType # |
Instance details Defined in Language.PureScript.AST.Declarations Methods rnf :: ImportDeclarationType -> () #
Generic ImportDeclarationType # |

Instance details

Defined in Language.PureScript.AST.Declarations

Associated Types

type Rep ImportDeclarationType |

Instance details

Defined in Language.PureScript.AST.Declarations

type Rep ImportDeclarationType = D1 ('MetaData "ImportDeclarationType" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "Implicit" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Explicit" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DeclarationRef])) :+: C1 ('MetaCons "Hiding" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DeclarationRef]))))

Methods

from :: ImportDeclarationType -> Rep ImportDeclarationType x #

to :: Rep ImportDeclarationType x -> ImportDeclarationType #

Show ImportDeclarationType # |
Instance details Defined in Language.PureScript.AST.Declarations Methods showsPrec :: Int -> ImportDeclarationType -> ShowS # show :: ImportDeclarationType -> String # showList :: [ImportDeclarationType] -> ShowS #
Eq ImportDeclarationType # |
Instance details Defined in Language.PureScript.AST.Declarations Methods (==) :: ImportDeclarationType -> ImportDeclarationType -> Bool # (/=) :: ImportDeclarationType -> ImportDeclarationType -> Bool #
Serialise ImportDeclarationType # |
Instance details Defined in Language.PureScript.AST.Declarations Methods encode :: ImportDeclarationType -> Encoding # decode :: Decoder s ImportDeclarationType # encodeList :: [ImportDeclarationType] -> Encoding # decodeList :: Decoder s [ImportDeclarationType] #
type Rep ImportDeclarationType # |

Instance details

Defined in Language.PureScript.AST.Declarations

type Rep ImportDeclarationType = D1 ('MetaData "ImportDeclarationType" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "Implicit" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Explicit" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DeclarationRef])) :+: C1 ('MetaCons "Hiding" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DeclarationRef]))))

isExplicit :: ImportDeclarationType -> Bool #

data RoleDeclarationData #

A role declaration assigns a list of roles to a type constructor's parameters, e.g.:

    type role T representational phantom

In this example, `T` is the identifier and `[representational, phantom]` is the list of roles (`T` presumably having two parameters).

Constructors

RoleDeclarationData |

Fields

- rdeclSourceAnn :: !SourceAnn
- rdeclIdent :: !(ProperName 'TypeName)
- rdeclRoles :: ![Role]

#### Instances

Instances details

NFData RoleDeclarationData # |
Instance details Defined in Language.PureScript.AST.Declarations Methods rnf :: RoleDeclarationData -> () #
Generic RoleDeclarationData # |

Instance details

Defined in Language.PureScript.AST.Declarations

Associated Types

type Rep RoleDeclarationData |

Instance details

Defined in Language.PureScript.AST.Declarations

type Rep RoleDeclarationData = D1 ('MetaData "RoleDeclarationData" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "RoleDeclarationData" 'PrefixI 'True) (S1 ('MetaSel ('Just "rdeclSourceAnn") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SourceAnn) :*: (S1 ('MetaSel ('Just "rdeclIdent") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ProperName 'TypeName)) :*: S1 ('MetaSel ('Just "rdeclRoles") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Role]))))

Methods

from :: RoleDeclarationData -> Rep RoleDeclarationData x #

to :: Rep RoleDeclarationData x -> RoleDeclarationData #

Show RoleDeclarationData # |
Instance details Defined in Language.PureScript.AST.Declarations Methods showsPrec :: Int -> RoleDeclarationData -> ShowS # show :: RoleDeclarationData -> String # showList :: [RoleDeclarationData] -> ShowS #
Eq RoleDeclarationData # |
Instance details Defined in Language.PureScript.AST.Declarations Methods (==) :: RoleDeclarationData -> RoleDeclarationData -> Bool # (/=) :: RoleDeclarationData -> RoleDeclarationData -> Bool #
type Rep RoleDeclarationData # |

Instance details

Defined in Language.PureScript.AST.Declarations

type Rep RoleDeclarationData = D1 ('MetaData "RoleDeclarationData" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "RoleDeclarationData" 'PrefixI 'True) (S1 ('MetaSel ('Just "rdeclSourceAnn") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SourceAnn) :*: (S1 ('MetaSel ('Just "rdeclIdent") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ProperName 'TypeName)) :*: S1 ('MetaSel ('Just "rdeclRoles") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Role]))))

data TypeDeclarationData #

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.

Constructors

TypeDeclarationData |

Fields

- tydeclSourceAnn :: !SourceAnn
- tydeclIdent :: !Ident
- tydeclType :: !SourceType

#### Instances

Instances details

NFData TypeDeclarationData # |
Instance details Defined in Language.PureScript.AST.Declarations Methods rnf :: TypeDeclarationData -> () #
Generic TypeDeclarationData # |

Instance details

Defined in Language.PureScript.AST.Declarations

Associated Types

type Rep TypeDeclarationData |

Instance details

Defined in Language.PureScript.AST.Declarations

type Rep TypeDeclarationData = D1 ('MetaData "TypeDeclarationData" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "TypeDeclarationData" 'PrefixI 'True) (S1 ('MetaSel ('Just "tydeclSourceAnn") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SourceAnn) :*: (S1 ('MetaSel ('Just "tydeclIdent") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Ident) :*: S1 ('MetaSel ('Just "tydeclType") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SourceType))))

Methods

from :: TypeDeclarationData -> Rep TypeDeclarationData x #

to :: Rep TypeDeclarationData x -> TypeDeclarationData #

Show TypeDeclarationData # |
Instance details Defined in Language.PureScript.AST.Declarations Methods showsPrec :: Int -> TypeDeclarationData -> ShowS # show :: TypeDeclarationData -> String # showList :: [TypeDeclarationData] -> ShowS #
Eq TypeDeclarationData # |
Instance details Defined in Language.PureScript.AST.Declarations Methods (==) :: TypeDeclarationData -> TypeDeclarationData -> Bool # (/=) :: TypeDeclarationData -> TypeDeclarationData -> Bool #
type Rep TypeDeclarationData # |

Instance details

Defined in Language.PureScript.AST.Declarations

type Rep TypeDeclarationData = D1 ('MetaData "TypeDeclarationData" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "TypeDeclarationData" 'PrefixI 'True) (S1 ('MetaSel ('Just "tydeclSourceAnn") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SourceAnn) :*: (S1 ('MetaSel ('Just "tydeclIdent") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Ident) :*: S1 ('MetaSel ('Just "tydeclType") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SourceType))))

getTypeDeclaration :: Declaration -> Maybe TypeDeclarationData #

unwrapTypeDeclaration :: TypeDeclarationData -> (Ident, SourceType) #

data ValueDeclarationData a #

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

- valdeclSourceAnn :: !SourceAnn
- valdeclIdent :: !Ident

  The declared value's name

- valdeclName :: !NameKind

  Whether or not this value is exported/visible

- valdeclBinders :: ![Binder]
- valdeclExpression :: !a

#### Instances

Instances details

Functor ValueDeclarationData # |
Instance details Defined in Language.PureScript.AST.Declarations Methods fmap :: (a -> b) -> ValueDeclarationData a -> ValueDeclarationData b # (<$) :: a -> ValueDeclarationData b -> ValueDeclarationData a #
Foldable ValueDeclarationData # |

Instance details

Defined in Language.PureScript.AST.Declarations

Methods

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

foldMap :: Monoid m => (a -> m) -> ValueDeclarationData a -> 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 # |

Instance details

Defined in Language.PureScript.AST.Declarations

Methods

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

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

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

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

NFData a => NFData (ValueDeclarationData a) # |
Instance details Defined in Language.PureScript.AST.Declarations Methods rnf :: ValueDeclarationData a -> () #
Generic (ValueDeclarationData a) # |

Instance details

Defined in Language.PureScript.AST.Declarations

Associated Types

type Rep (ValueDeclarationData a) |

Instance details

Defined in Language.PureScript.AST.Declarations

type Rep (ValueDeclarationData a) = D1 ('MetaData "ValueDeclarationData" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "ValueDeclarationData" 'PrefixI 'True) ((S1 ('MetaSel ('Just "valdeclSourceAnn") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SourceAnn) :*: S1 ('MetaSel ('Just "valdeclIdent") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Ident)) :*: (S1 ('MetaSel ('Just "valdeclName") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NameKind) :*: (S1 ('MetaSel ('Just "valdeclBinders") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Binder]) :*: S1 ('MetaSel ('Just "valdeclExpression") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a)))))

Methods

from :: ValueDeclarationData a -> Rep (ValueDeclarationData a) x #

to :: Rep (ValueDeclarationData a) x -> ValueDeclarationData a #

Show a => Show (ValueDeclarationData a) # |
Instance details Defined in Language.PureScript.AST.Declarations Methods showsPrec :: Int -> ValueDeclarationData a -> ShowS # show :: ValueDeclarationData a -> String # showList :: [ValueDeclarationData a] -> ShowS #
type Rep (ValueDeclarationData a) # |

Instance details

Defined in Language.PureScript.AST.Declarations

type Rep (ValueDeclarationData a) = D1 ('MetaData "ValueDeclarationData" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "ValueDeclarationData" 'PrefixI 'True) ((S1 ('MetaSel ('Just "valdeclSourceAnn") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SourceAnn) :*: S1 ('MetaSel ('Just "valdeclIdent") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Ident)) :*: (S1 ('MetaSel ('Just "valdeclName") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NameKind) :*: (S1 ('MetaSel ('Just "valdeclBinders") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Binder]) :*: S1 ('MetaSel ('Just "valdeclExpression") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a)))))

getValueDeclaration :: Declaration -> Maybe (ValueDeclarationData [GuardedExpr]) #

pattern ValueDecl :: SourceAnn -> Ident -> NameKind -> [Binder] -> [GuardedExpr] -> Declaration #

data DataConstructorDeclaration #

Constructors

DataConstructorDeclaration |

Fields

- dataCtorAnn :: !SourceAnn
- dataCtorName :: !(ProperName 'ConstructorName)
- dataCtorFields :: ![(Ident, SourceType)]

#### Instances

Instances details

NFData DataConstructorDeclaration # |
Instance details Defined in Language.PureScript.AST.Declarations Methods rnf :: DataConstructorDeclaration -> () #
Generic DataConstructorDeclaration # |

Instance details

Defined in Language.PureScript.AST.Declarations

Associated Types

type Rep DataConstructorDeclaration |

Instance details

Defined in Language.PureScript.AST.Declarations

type Rep DataConstructorDeclaration = D1 ('MetaData "DataConstructorDeclaration" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "DataConstructorDeclaration" 'PrefixI 'True) (S1 ('MetaSel ('Just "dataCtorAnn") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SourceAnn) :*: (S1 ('MetaSel ('Just "dataCtorName") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ProperName 'ConstructorName)) :*: S1 ('MetaSel ('Just "dataCtorFields") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [(Ident, SourceType)]))))

Methods

from :: DataConstructorDeclaration -> Rep DataConstructorDeclaration x #

to :: Rep DataConstructorDeclaration x -> DataConstructorDeclaration #

Show DataConstructorDeclaration # |
Instance details Defined in Language.PureScript.AST.Declarations Methods showsPrec :: Int -> DataConstructorDeclaration -> ShowS # show :: DataConstructorDeclaration -> String # showList :: [DataConstructorDeclaration] -> ShowS #
Eq DataConstructorDeclaration # |
Instance details Defined in Language.PureScript.AST.Declarations Methods (==) :: DataConstructorDeclaration -> DataConstructorDeclaration -> Bool # (/=) :: DataConstructorDeclaration -> DataConstructorDeclaration -> Bool #
type Rep DataConstructorDeclaration # |

Instance details

Defined in Language.PureScript.AST.Declarations

type Rep DataConstructorDeclaration = D1 ('MetaData "DataConstructorDeclaration" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "DataConstructorDeclaration" 'PrefixI 'True) (S1 ('MetaSel ('Just "dataCtorAnn") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SourceAnn) :*: (S1 ('MetaSel ('Just "dataCtorName") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ProperName 'ConstructorName)) :*: S1 ('MetaSel ('Just "dataCtorFields") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [(Ident, SourceType)]))))

mapDataCtorFields :: ([(Ident, SourceType)] -> [(Ident, SourceType)]) -> DataConstructorDeclaration -> DataConstructorDeclaration #

traverseDataCtorFields :: Monad m => ([(Ident, SourceType)] -> m [(Ident, SourceType)]) -> DataConstructorDeclaration -> m DataConstructorDeclaration #

data Declaration #

The data type of declarations

Constructors

DataDeclaration SourceAnn DataDeclType (ProperName 'TypeName) [(Text, Maybe SourceType)] [DataConstructorDeclaration] | 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 SourceType)] SourceType | A type synonym declaration (name, arguments, type)
KindDeclaration SourceAnn KindSignatureFor (ProperName 'TypeName) SourceType | A kind signature declaration
RoleDeclaration !RoleDeclarationData | A role declaration (name, roles)
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) SourceType | A data type foreign import (name, kind)
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 SourceType)] [SourceConstraint] [FunctionalDependency] [Declaration] | A type class declaration (name, argument, implies, member declarations)

TypeInstanceDeclaration SourceAnn SourceAnn ChainId Integer (Either Text Ident) [SourceConstraint] (Qualified (ProperName 'ClassName)) [SourceType] TypeInstanceBody

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

The first `SourceAnn` serves as the annotation for the entire declaration, while the second `SourceAnn` serves as the annotation for the type class and its arguments.

#### Instances

Instances details

NFData Declaration # |
Instance details Defined in Language.PureScript.AST.Declarations Methods rnf :: Declaration -> () #
Generic Declaration # |

Instance details

Defined in Language.PureScript.AST.Declarations

Associated Types

type Rep Declaration |

Instance details

Defined in Language.PureScript.AST.Declarations

type Rep Declaration = D1 ('MetaData "Declaration" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (((C1 ('MetaCons "DataDeclaration" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceAnn) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DataDeclType)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ProperName 'TypeName)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Text, Maybe SourceType)]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DataConstructorDeclaration])))) :+: (C1 ('MetaCons "DataBindingGroupDeclaration" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty Declaration))) :+: C1 ('MetaCons "TypeSynonymDeclaration" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceAnn) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ProperName 'TypeName))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Text, Maybe SourceType)]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceType))))) :+: ((C1 ('MetaCons "KindDeclaration" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceAnn) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 KindSignatureFor)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ProperName 'TypeName)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceType))) :+: C1 ('MetaCons "RoleDeclaration" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 RoleDeclarationData))) :+: (C1 ('MetaCons "TypeDeclaration" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 TypeDeclarationData)) :+: C1 ('MetaCons "ValueDeclaration" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 (ValueDeclarationData [GuardedExpr])))))) :+: (((C1 ('MetaCons "BoundValueDeclaration" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceAnn) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Binder) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr))) :+: C1 ('MetaCons "BindingGroupDeclaration" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty ((SourceAnn, Ident), NameKind, Expr))))) :+: (C1 ('MetaCons "ExternDeclaration" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceAnn) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ident) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceType))) :+: C1 ('MetaCons "ExternDataDeclaration" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceAnn) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ProperName 'TypeName)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceType))))) :+: ((C1 ('MetaCons "FixityDeclaration" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceAnn) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Either ValueFixity TypeFixity))) :+: C1 ('MetaCons "ImportDeclaration" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceAnn) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ModuleName)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ImportDeclarationType) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ModuleName))))) :+: (C1 ('MetaCons "TypeClassDeclaration" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceAnn) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ProperName 'ClassName)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Text, Maybe SourceType)]))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [SourceConstraint]) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [FunctionalDependency]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Declaration])))) :+: C1 ('MetaCons "TypeInstanceDeclaration" 'PrefixI 'False) (((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceAnn) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceAnn)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ChainId) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer))) :*: ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Either Text Ident)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [SourceConstraint])) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Qualified (ProperName 'ClassName))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [SourceType]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TypeInstanceBody)))))))))

Methods

from :: Declaration -> Rep Declaration x #

to :: Rep Declaration x -> Declaration #

Show Declaration # |
Instance details Defined in Language.PureScript.AST.Declarations Methods showsPrec :: Int -> Declaration -> ShowS # show :: Declaration -> String # showList :: [Declaration] -> ShowS #
type Rep Declaration # |

Instance details

Defined in Language.PureScript.AST.Declarations

type Rep Declaration = D1 ('MetaData "Declaration" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (((C1 ('MetaCons "DataDeclaration" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceAnn) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DataDeclType)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ProperName 'TypeName)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Text, Maybe SourceType)]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DataConstructorDeclaration])))) :+: (C1 ('MetaCons "DataBindingGroupDeclaration" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty Declaration))) :+: C1 ('MetaCons "TypeSynonymDeclaration" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceAnn) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ProperName 'TypeName))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Text, Maybe SourceType)]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceType))))) :+: ((C1 ('MetaCons "KindDeclaration" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceAnn) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 KindSignatureFor)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ProperName 'TypeName)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceType))) :+: C1 ('MetaCons "RoleDeclaration" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 RoleDeclarationData))) :+: (C1 ('MetaCons "TypeDeclaration" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 TypeDeclarationData)) :+: C1 ('MetaCons "ValueDeclaration" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 (ValueDeclarationData [GuardedExpr])))))) :+: (((C1 ('MetaCons "BoundValueDeclaration" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceAnn) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Binder) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr))) :+: C1 ('MetaCons "BindingGroupDeclaration" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty ((SourceAnn, Ident), NameKind, Expr))))) :+: (C1 ('MetaCons "ExternDeclaration" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceAnn) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ident) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceType))) :+: C1 ('MetaCons "ExternDataDeclaration" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceAnn) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ProperName 'TypeName)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceType))))) :+: ((C1 ('MetaCons "FixityDeclaration" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceAnn) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Either ValueFixity TypeFixity))) :+: C1 ('MetaCons "ImportDeclaration" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceAnn) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ModuleName)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ImportDeclarationType) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ModuleName))))) :+: (C1 ('MetaCons "TypeClassDeclaration" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceAnn) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ProperName 'ClassName)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Text, Maybe SourceType)]))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [SourceConstraint]) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [FunctionalDependency]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Declaration])))) :+: C1 ('MetaCons "TypeInstanceDeclaration" 'PrefixI 'False) (((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceAnn) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceAnn)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ChainId) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer))) :*: ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Either Text Ident)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [SourceConstraint])) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Qualified (ProperName 'ClassName))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [SourceType]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TypeInstanceBody)))))))))

data ValueFixity #

Constructors

ValueFixity Fixity (Qualified (Either Ident (ProperName 'ConstructorName))) (OpName 'ValueOpName) |

#### Instances

Instances details

NFData ValueFixity # |
Instance details Defined in Language.PureScript.AST.Declarations Methods rnf :: ValueFixity -> () #
Generic ValueFixity # |

Instance details

Defined in Language.PureScript.AST.Declarations

Associated Types

type Rep ValueFixity |

Instance details

Defined in Language.PureScript.AST.Declarations

type Rep ValueFixity = D1 ('MetaData "ValueFixity" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "ValueFixity" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Fixity) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Qualified (Either Ident (ProperName 'ConstructorName)))) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OpName 'ValueOpName)))))

Methods

from :: ValueFixity -> Rep ValueFixity x #

to :: Rep ValueFixity x -> ValueFixity #

Show ValueFixity # |
Instance details Defined in Language.PureScript.AST.Declarations Methods showsPrec :: Int -> ValueFixity -> ShowS # show :: ValueFixity -> String # showList :: [ValueFixity] -> ShowS #
Eq ValueFixity # |
Instance details Defined in Language.PureScript.AST.Declarations Methods (==) :: ValueFixity -> ValueFixity -> Bool # (/=) :: ValueFixity -> ValueFixity -> Bool #
Ord ValueFixity # |

Instance details

Defined in Language.PureScript.AST.Declarations

Methods

compare :: ValueFixity -> ValueFixity -> Ordering #

(<) :: ValueFixity -> ValueFixity -> Bool #

(<=) :: ValueFixity -> ValueFixity -> Bool #

(>) :: ValueFixity -> ValueFixity -> Bool #

(>=) :: ValueFixity -> ValueFixity -> Bool #

max :: ValueFixity -> ValueFixity -> ValueFixity #

min :: ValueFixity -> ValueFixity -> ValueFixity #

type Rep ValueFixity # |

Instance details

Defined in Language.PureScript.AST.Declarations

type Rep ValueFixity = D1 ('MetaData "ValueFixity" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "ValueFixity" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Fixity) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Qualified (Either Ident (ProperName 'ConstructorName)))) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OpName 'ValueOpName)))))

data TypeFixity #

Constructors

TypeFixity Fixity (Qualified (ProperName 'TypeName)) (OpName 'TypeOpName) |

#### Instances

Instances details

NFData TypeFixity # |
Instance details Defined in Language.PureScript.AST.Declarations Methods rnf :: TypeFixity -> () #
Generic TypeFixity # |

Instance details

Defined in Language.PureScript.AST.Declarations

Associated Types

type Rep TypeFixity |

Instance details

Defined in Language.PureScript.AST.Declarations

type Rep TypeFixity = D1 ('MetaData "TypeFixity" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "TypeFixity" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Fixity) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Qualified (ProperName 'TypeName))) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OpName 'TypeOpName)))))

Methods

from :: TypeFixity -> Rep TypeFixity x #

to :: Rep TypeFixity x -> TypeFixity #

Show TypeFixity # |
Instance details Defined in Language.PureScript.AST.Declarations Methods showsPrec :: Int -> TypeFixity -> ShowS # show :: TypeFixity -> String # showList :: [TypeFixity] -> ShowS #
Eq TypeFixity # |
Instance details Defined in Language.PureScript.AST.Declarations Methods (==) :: TypeFixity -> TypeFixity -> Bool # (/=) :: TypeFixity -> TypeFixity -> Bool #
Ord TypeFixity # |
Instance details Defined in Language.PureScript.AST.Declarations Methods compare :: TypeFixity -> TypeFixity -> Ordering # (<) :: TypeFixity -> TypeFixity -> Bool # (<=) :: TypeFixity -> TypeFixity -> Bool # (>) :: TypeFixity -> TypeFixity -> Bool # (>=) :: TypeFixity -> TypeFixity -> Bool # max :: TypeFixity -> TypeFixity -> TypeFixity # min :: TypeFixity -> TypeFixity -> TypeFixity #
type Rep TypeFixity # |

Instance details

Defined in Language.PureScript.AST.Declarations

type Rep TypeFixity = D1 ('MetaData "TypeFixity" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "TypeFixity" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Fixity) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Qualified (ProperName 'TypeName))) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OpName 'TypeOpName)))))

pattern ValueFixityDeclaration :: SourceAnn -> Fixity -> Qualified (Either Ident (ProperName 'ConstructorName)) -> OpName 'ValueOpName -> Declaration #

pattern TypeFixityDeclaration :: SourceAnn -> Fixity -> Qualified (ProperName 'TypeName) -> OpName 'TypeOpName -> Declaration #

data InstanceDerivationStrategy #

Constructors

KnownClassStrategy |
NewtypeStrategy |

#### Instances

Instances details

NFData InstanceDerivationStrategy # |
Instance details Defined in Language.PureScript.AST.Declarations Methods rnf :: InstanceDerivationStrategy -> () #
Generic InstanceDerivationStrategy # |

Instance details

Defined in Language.PureScript.AST.Declarations

Associated Types

type Rep InstanceDerivationStrategy |
Instance details Defined in Language.PureScript.AST.Declarations type Rep InstanceDerivationStrategy = D1 ('MetaData "InstanceDerivationStrategy" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "KnownClassStrategy" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NewtypeStrategy" 'PrefixI 'False) (U1 :: Type -> Type))

Methods

from :: InstanceDerivationStrategy -> Rep InstanceDerivationStrategy x #

to :: Rep InstanceDerivationStrategy x -> InstanceDerivationStrategy #

Show InstanceDerivationStrategy # |
Instance details Defined in Language.PureScript.AST.Declarations Methods showsPrec :: Int -> InstanceDerivationStrategy -> ShowS # show :: InstanceDerivationStrategy -> String # showList :: [InstanceDerivationStrategy] -> ShowS #
type Rep InstanceDerivationStrategy # |
Instance details Defined in Language.PureScript.AST.Declarations type Rep InstanceDerivationStrategy = D1 ('MetaData "InstanceDerivationStrategy" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "KnownClassStrategy" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NewtypeStrategy" 'PrefixI 'False) (U1 :: Type -> Type))

data TypeInstanceBody #

The members of a type class instance declaration

Constructors

DerivedInstance | This is a derived instance
NewtypeInstance | This is an instance derived from a newtype
ExplicitInstance [Declaration] | This is a regular (explicit) instance

#### Instances

Instances details

NFData TypeInstanceBody # |
Instance details Defined in Language.PureScript.AST.Declarations Methods rnf :: TypeInstanceBody -> () #
Generic TypeInstanceBody # |

Instance details

Defined in Language.PureScript.AST.Declarations

Associated Types

type Rep TypeInstanceBody |

Instance details

Defined in Language.PureScript.AST.Declarations

type Rep TypeInstanceBody = D1 ('MetaData "TypeInstanceBody" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "DerivedInstance" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "NewtypeInstance" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ExplicitInstance" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Declaration]))))

Methods

from :: TypeInstanceBody -> Rep TypeInstanceBody x #

to :: Rep TypeInstanceBody x -> TypeInstanceBody #

Show TypeInstanceBody # |
Instance details Defined in Language.PureScript.AST.Declarations Methods showsPrec :: Int -> TypeInstanceBody -> ShowS # show :: TypeInstanceBody -> String # showList :: [TypeInstanceBody] -> ShowS #
type Rep TypeInstanceBody # |

Instance details

Defined in Language.PureScript.AST.Declarations

type Rep TypeInstanceBody = D1 ('MetaData "TypeInstanceBody" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "DerivedInstance" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "NewtypeInstance" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ExplicitInstance" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Declaration]))))

mapTypeInstanceBody :: ([Declaration] -> [Declaration]) -> TypeInstanceBody -> TypeInstanceBody #

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

A traversal for TypeInstanceBody

data KindSignatureFor #

What sort of declaration the kind signature applies to.

Constructors

DataSig |
NewtypeSig |
TypeSynonymSig |
ClassSig |

#### Instances

Instances details

NFData KindSignatureFor # |
Instance details Defined in Language.PureScript.AST.Declarations Methods rnf :: KindSignatureFor -> () #
Generic KindSignatureFor # |

Instance details

Defined in Language.PureScript.AST.Declarations

Associated Types

type Rep KindSignatureFor |

Instance details

Defined in Language.PureScript.AST.Declarations

type Rep KindSignatureFor = D1 ('MetaData "KindSignatureFor" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) ((C1 ('MetaCons "DataSig" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NewtypeSig" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "TypeSynonymSig" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ClassSig" 'PrefixI 'False) (U1 :: Type -> Type)))

Methods

from :: KindSignatureFor -> Rep KindSignatureFor x #

to :: Rep KindSignatureFor x -> KindSignatureFor #

Show KindSignatureFor # |
Instance details Defined in Language.PureScript.AST.Declarations Methods showsPrec :: Int -> KindSignatureFor -> ShowS # show :: KindSignatureFor -> String # showList :: [KindSignatureFor] -> ShowS #
Eq KindSignatureFor # |
Instance details Defined in Language.PureScript.AST.Declarations Methods (==) :: KindSignatureFor -> KindSignatureFor -> Bool # (/=) :: KindSignatureFor -> KindSignatureFor -> Bool #
Ord KindSignatureFor # |

Instance details

Defined in Language.PureScript.AST.Declarations

Methods

compare :: KindSignatureFor -> KindSignatureFor -> Ordering #

(<) :: KindSignatureFor -> KindSignatureFor -> Bool #

(<=) :: KindSignatureFor -> KindSignatureFor -> Bool #

(>) :: KindSignatureFor -> KindSignatureFor -> Bool #

(>=) :: KindSignatureFor -> KindSignatureFor -> Bool #

max :: KindSignatureFor -> KindSignatureFor -> KindSignatureFor #

min :: KindSignatureFor -> KindSignatureFor -> KindSignatureFor #

type Rep KindSignatureFor # |

Instance details

Defined in Language.PureScript.AST.Declarations

type Rep KindSignatureFor = D1 ('MetaData "KindSignatureFor" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) ((C1 ('MetaCons "DataSig" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NewtypeSig" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "TypeSynonymSig" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ClassSig" 'PrefixI 'False) (U1 :: Type -> Type)))

declSourceAnn :: Declaration -> SourceAnn #

declSourceSpan :: Declaration -> SourceSpan #

declName :: Declaration -> Maybe Name #

isValueDecl :: Declaration -> Bool #

Test if a declaration is a value declaration

isDataDecl :: Declaration -> Bool #

Test if a declaration is a data type declaration

isTypeSynonymDecl :: Declaration -> Bool #

Test if a declaration is a type synonym declaration

isImportDecl :: Declaration -> Bool #

Test if a declaration is a module import

isRoleDecl :: Declaration -> Bool #

Test if a declaration is a role declaration

isExternDataDecl :: Declaration -> Bool #

Test if a declaration is a data type foreign import

isFixityDecl :: Declaration -> Bool #

Test if a declaration is a fixity declaration

getFixityDecl :: Declaration -> Maybe (Either ValueFixity TypeFixity) #

isExternDecl :: Declaration -> Bool #

Test if a declaration is a foreign import

isTypeClassInstanceDecl :: Declaration -> Bool #

Test if a declaration is a type class instance declaration

isTypeClassDecl :: Declaration -> Bool #

Test if a declaration is a type class declaration

isKindDecl :: Declaration -> Bool #

Test if a declaration is a kind signature declaration.

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

Recursively flatten data binding groups in the list of declarations

data Guard #

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

Constructors

ConditionGuard Expr |
PatternGuard Binder Expr |

#### Instances

Instances details

NFData Guard # |
Instance details Defined in Language.PureScript.AST.Declarations Methods rnf :: Guard -> () #
Generic Guard # |

Instance details

Defined in Language.PureScript.AST.Declarations

Associated Types

type Rep Guard |

Instance details

Defined in Language.PureScript.AST.Declarations

type Rep Guard = D1 ('MetaData "Guard" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "ConditionGuard" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr)) :+: C1 ('MetaCons "PatternGuard" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Binder) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr)))

Methods

from :: Guard -> Rep Guard x #

to :: Rep Guard x -> Guard #

Show Guard # |
Instance details Defined in Language.PureScript.AST.Declarations Methods showsPrec :: Int -> Guard -> ShowS # show :: Guard -> String # showList :: [Guard] -> ShowS #
type Rep Guard # |

Instance details

Defined in Language.PureScript.AST.Declarations

type Rep Guard = D1 ('MetaData "Guard" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "ConditionGuard" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr)) :+: C1 ('MetaCons "PatternGuard" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Binder) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr)))

data GuardedExpr #

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

Constructors

GuardedExpr [Guard] Expr |

#### Instances

Instances details

NFData GuardedExpr # |
Instance details Defined in Language.PureScript.AST.Declarations Methods rnf :: GuardedExpr -> () #
Generic GuardedExpr # |

Instance details

Defined in Language.PureScript.AST.Declarations

Associated Types

type Rep GuardedExpr |

Instance details

Defined in Language.PureScript.AST.Declarations

type Rep GuardedExpr = D1 ('MetaData "GuardedExpr" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "GuardedExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Guard]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr)))

Methods

from :: GuardedExpr -> Rep GuardedExpr x #

to :: Rep GuardedExpr x -> GuardedExpr #

Show GuardedExpr # |
Instance details Defined in Language.PureScript.AST.Declarations Methods showsPrec :: Int -> GuardedExpr -> ShowS # show :: GuardedExpr -> String # showList :: [GuardedExpr] -> ShowS #
type Rep GuardedExpr # |

Instance details

Defined in Language.PureScript.AST.Declarations

type Rep GuardedExpr = D1 ('MetaData "GuardedExpr" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "GuardedExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Guard]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr)))

pattern MkUnguarded :: Expr -> GuardedExpr #

data Expr #

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 `ObjectUpdate`s
Abs Binder Expr | Function introduction
App Expr Expr | Function application
VisibleTypeApp Expr SourceType | A type application (e.g. `f @Int`)
Unused Expr | Hint that an expression is unused. This is used to ignore type class dictionaries that are necessarily empty. The inner expression lets us solve subgoals before eliminating the whole expression. The code gen will render this as `undefined`, regardless of what the inner expression is.
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

TypeClassDictionary SourceConstraint (Map QualifiedBy (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.

DeferredDictionary (Qualified (ProperName 'ClassName)) [SourceType] | A placeholder for a superclass dictionary to be turned into a TypeClassDictionary during typechecking
DerivedInstancePlaceholder (Qualified (ProperName 'ClassName)) InstanceDerivationStrategy | A placeholder for a type class instance to be derived 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

Instances details

NFData Expr # |
Instance details Defined in Language.PureScript.AST.Declarations Methods rnf :: Expr -> () #
Generic Expr # |

Instance details

Defined in Language.PureScript.AST.Declarations

Associated Types

type Rep Expr |

Instance details

Defined in Language.PureScript.AST.Declarations

type Rep Expr = D1 ('MetaData "Expr" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) ((((C1 ('MetaCons "Literal" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceSpan) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Literal Expr))) :+: (C1 ('MetaCons "UnaryMinus" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceSpan) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr)) :+: C1 ('MetaCons "BinaryNoParens" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr))))) :+: (C1 ('MetaCons "Parens" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr)) :+: (C1 ('MetaCons "Accessor" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PSString) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr)) :+: C1 ('MetaCons "ObjectUpdate" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(PSString, Expr)]))))) :+: ((C1 ('MetaCons "ObjectUpdateNested" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PathTree Expr))) :+: (C1 ('MetaCons "Abs" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Binder) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr)) :+: C1 ('MetaCons "App" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr)))) :+: ((C1 ('MetaCons "VisibleTypeApp" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceType)) :+: C1 ('MetaCons "Unused" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr))) :+: (C1 ('MetaCons "Var" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceSpan) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Qualified Ident))) :+: C1 ('MetaCons "Op" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceSpan) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Qualified (OpName 'ValueOpName)))))))) :+: (((C1 ('MetaCons "IfThenElse" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr))) :+: (C1 ('MetaCons "Constructor" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceSpan) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Qualified (ProperName 'ConstructorName)))) :+: C1 ('MetaCons "Case" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Expr]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [CaseAlternative])))) :+: (C1 ('MetaCons "TypedValue" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceType))) :+: (C1 ('MetaCons "Let" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 WhereProvenance) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Declaration]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr))) :+: C1 ('MetaCons "Do" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ModuleName)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DoNotationElement]))))) :+: ((C1 ('MetaCons "Ado" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ModuleName)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DoNotationElement]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr))) :+: (C1 ('MetaCons "TypeClassDictionary" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceConstraint) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map QualifiedBy (Map (Qualified (ProperName 'ClassName)) (Map (Qualified Ident) (NonEmpty NamedDict))))) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ErrorMessageHint]))) :+: C1 ('MetaCons "DeferredDictionary" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Qualified (ProperName 'ClassName))) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [SourceType])))) :+: ((C1 ('MetaCons "DerivedInstancePlaceholder" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Qualified (ProperName 'ClassName))) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 InstanceDerivationStrategy)) :+: C1 ('MetaCons "AnonymousArgument" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Hole" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: C1 ('MetaCons "PositionedValue" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceSpan) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Comment]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr))))))))

Methods

from :: Expr -> Rep Expr x #

to :: Rep Expr x -> Expr #

Show Expr # |
Instance details Defined in Language.PureScript.AST.Declarations Methods showsPrec :: Int -> Expr -> ShowS # show :: Expr -> String # showList :: [Expr] -> ShowS #
type Rep Expr # |

Instance details

Defined in Language.PureScript.AST.Declarations

type Rep Expr = D1 ('MetaData "Expr" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) ((((C1 ('MetaCons "Literal" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceSpan) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Literal Expr))) :+: (C1 ('MetaCons "UnaryMinus" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceSpan) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr)) :+: C1 ('MetaCons "BinaryNoParens" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr))))) :+: (C1 ('MetaCons "Parens" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr)) :+: (C1 ('MetaCons "Accessor" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PSString) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr)) :+: C1 ('MetaCons "ObjectUpdate" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(PSString, Expr)]))))) :+: ((C1 ('MetaCons "ObjectUpdateNested" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PathTree Expr))) :+: (C1 ('MetaCons "Abs" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Binder) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr)) :+: C1 ('MetaCons "App" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr)))) :+: ((C1 ('MetaCons "VisibleTypeApp" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceType)) :+: C1 ('MetaCons "Unused" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr))) :+: (C1 ('MetaCons "Var" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceSpan) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Qualified Ident))) :+: C1 ('MetaCons "Op" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceSpan) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Qualified (OpName 'ValueOpName)))))))) :+: (((C1 ('MetaCons "IfThenElse" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr))) :+: (C1 ('MetaCons "Constructor" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceSpan) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Qualified (ProperName 'ConstructorName)))) :+: C1 ('MetaCons "Case" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Expr]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [CaseAlternative])))) :+: (C1 ('MetaCons "TypedValue" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceType))) :+: (C1 ('MetaCons "Let" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 WhereProvenance) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Declaration]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr))) :+: C1 ('MetaCons "Do" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ModuleName)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DoNotationElement]))))) :+: ((C1 ('MetaCons "Ado" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ModuleName)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DoNotationElement]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr))) :+: (C1 ('MetaCons "TypeClassDictionary" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceConstraint) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map QualifiedBy (Map (Qualified (ProperName 'ClassName)) (Map (Qualified Ident) (NonEmpty NamedDict))))) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ErrorMessageHint]))) :+: C1 ('MetaCons "DeferredDictionary" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Qualified (ProperName 'ClassName))) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [SourceType])))) :+: ((C1 ('MetaCons "DerivedInstancePlaceholder" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Qualified (ProperName 'ClassName))) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 InstanceDerivationStrategy)) :+: C1 ('MetaCons "AnonymousArgument" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Hole" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: C1 ('MetaCons "PositionedValue" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceSpan) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Comment]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr))))))))

data WhereProvenance #

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

#### Instances

Instances details

NFData WhereProvenance # |
Instance details Defined in Language.PureScript.AST.Declarations Methods rnf :: WhereProvenance -> () #
Generic WhereProvenance # |

Instance details

Defined in Language.PureScript.AST.Declarations

Associated Types

type Rep WhereProvenance |
Instance details Defined in Language.PureScript.AST.Declarations type Rep WhereProvenance = D1 ('MetaData "WhereProvenance" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "FromWhere" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "FromLet" 'PrefixI 'False) (U1 :: Type -> Type))

Methods

from :: WhereProvenance -> Rep WhereProvenance x #

to :: Rep WhereProvenance x -> WhereProvenance #

Show WhereProvenance # |
Instance details Defined in Language.PureScript.AST.Declarations Methods showsPrec :: Int -> WhereProvenance -> ShowS # show :: WhereProvenance -> String # showList :: [WhereProvenance] -> ShowS #
type Rep WhereProvenance # |
Instance details Defined in Language.PureScript.AST.Declarations type Rep WhereProvenance = D1 ('MetaData "WhereProvenance" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "FromWhere" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "FromLet" 'PrefixI 'False) (U1 :: Type -> Type))

data CaseAlternative #

An alternative in a case statement

Constructors

CaseAlternative |

Fields

- caseAlternativeBinders :: [Binder]

  A collection of binders with which to match the inputs

- caseAlternativeResult :: [GuardedExpr]

  The result expression or a collect of guarded expressions

#### Instances

Instances details

NFData CaseAlternative # |
Instance details Defined in Language.PureScript.AST.Declarations Methods rnf :: CaseAlternative -> () #
Generic CaseAlternative # |

Instance details

Defined in Language.PureScript.AST.Declarations

Associated Types

type Rep CaseAlternative |

Instance details

Defined in Language.PureScript.AST.Declarations

type Rep CaseAlternative = D1 ('MetaData "CaseAlternative" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "CaseAlternative" 'PrefixI 'True) (S1 ('MetaSel ('Just "caseAlternativeBinders") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Binder]) :*: S1 ('MetaSel ('Just "caseAlternativeResult") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [GuardedExpr])))

Methods

from :: CaseAlternative -> Rep CaseAlternative x #

to :: Rep CaseAlternative x -> CaseAlternative #

Show CaseAlternative # |
Instance details Defined in Language.PureScript.AST.Declarations Methods showsPrec :: Int -> CaseAlternative -> ShowS # show :: CaseAlternative -> String # showList :: [CaseAlternative] -> ShowS #
type Rep CaseAlternative # |

Instance details

Defined in Language.PureScript.AST.Declarations

type Rep CaseAlternative = D1 ('MetaData "CaseAlternative" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "CaseAlternative" 'PrefixI 'True) (S1 ('MetaSel ('Just "caseAlternativeBinders") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Binder]) :*: S1 ('MetaSel ('Just "caseAlternativeResult") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [GuardedExpr])))

data DoNotationElement #

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

#### Instances

Instances details

NFData DoNotationElement # |
Instance details Defined in Language.PureScript.AST.Declarations Methods rnf :: DoNotationElement -> () #
Generic DoNotationElement # |

Instance details

Defined in Language.PureScript.AST.Declarations

Associated Types

type Rep DoNotationElement |

Instance details

Defined in Language.PureScript.AST.Declarations

type Rep DoNotationElement = D1 ('MetaData "DoNotationElement" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) ((C1 ('MetaCons "DoNotationValue" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr)) :+: C1 ('MetaCons "DoNotationBind" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Binder) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr))) :+: (C1 ('MetaCons "DoNotationLet" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Declaration])) :+: C1 ('MetaCons "PositionedDoNotationElement" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceSpan) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Comment]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DoNotationElement)))))

Methods

from :: DoNotationElement -> Rep DoNotationElement x #

to :: Rep DoNotationElement x -> DoNotationElement #

Show DoNotationElement # |
Instance details Defined in Language.PureScript.AST.Declarations Methods showsPrec :: Int -> DoNotationElement -> ShowS # show :: DoNotationElement -> String # showList :: [DoNotationElement] -> ShowS #
type Rep DoNotationElement # |

Instance details

Defined in Language.PureScript.AST.Declarations

type Rep DoNotationElement = D1 ('MetaData "DoNotationElement" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) ((C1 ('MetaCons "DoNotationValue" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr)) :+: C1 ('MetaCons "DoNotationBind" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Binder) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr))) :+: (C1 ('MetaCons "DoNotationLet" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Declaration])) :+: C1 ('MetaCons "PositionedDoNotationElement" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceSpan) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Comment]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DoNotationElement)))))

newtype PathTree t #

Constructors

PathTree (AssocList PSString (PathNode t)) |

#### Instances

Instances details

Functor PathTree # |
Instance details Defined in Language.PureScript.AST.Declarations Methods fmap :: (a -> b) -> PathTree a -> PathTree b # (<$) :: a -> PathTree b -> PathTree a #
Foldable PathTree # |

Instance details

Defined in Language.PureScript.AST.Declarations

Methods

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

foldMap :: Monoid m => (a -> m) -> PathTree a -> 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 # |
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) #
NFData t => NFData (PathTree t) # |
Instance details Defined in Language.PureScript.AST.Declarations Methods rnf :: PathTree t -> () #
Show t => Show (PathTree t) # |
Instance details Defined in Language.PureScript.AST.Declarations Methods showsPrec :: Int -> PathTree t -> ShowS # show :: PathTree t -> String # showList :: [PathTree t] -> ShowS #
Eq t => Eq (PathTree t) # |
Instance details Defined in Language.PureScript.AST.Declarations Methods (==) :: PathTree t -> PathTree t -> Bool # (/=) :: PathTree t -> PathTree t -> Bool #
Ord t => Ord (PathTree t) # |
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 #

data PathNode t #

Constructors

Leaf t |
Branch (PathTree t) |

#### Instances

Instances details

Functor PathNode # |
Instance details Defined in Language.PureScript.AST.Declarations Methods fmap :: (a -> b) -> PathNode a -> PathNode b # (<$) :: a -> PathNode b -> PathNode a #
Foldable PathNode # |

Instance details

Defined in Language.PureScript.AST.Declarations

Methods

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

foldMap :: Monoid m => (a -> m) -> PathNode a -> 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 # |
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) #
NFData t => NFData (PathNode t) # |
Instance details Defined in Language.PureScript.AST.Declarations Methods rnf :: PathNode t -> () #
Generic (PathNode t) # |

Instance details

Defined in Language.PureScript.AST.Declarations

Associated Types

type Rep (PathNode t) |

Instance details

Defined in Language.PureScript.AST.Declarations

type Rep (PathNode t) = D1 ('MetaData "PathNode" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "Leaf" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 t)) :+: C1 ('MetaCons "Branch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PathTree t))))

Methods

from :: PathNode t -> Rep (PathNode t) x #

to :: Rep (PathNode t) x -> PathNode t #

Show t => Show (PathNode t) # |
Instance details Defined in Language.PureScript.AST.Declarations Methods showsPrec :: Int -> PathNode t -> ShowS # show :: PathNode t -> String # showList :: [PathNode t] -> ShowS #
Eq t => Eq (PathNode t) # |
Instance details Defined in Language.PureScript.AST.Declarations Methods (==) :: PathNode t -> PathNode t -> Bool # (/=) :: PathNode t -> PathNode t -> Bool #
Ord t => Ord (PathNode t) # |
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 #
type Rep (PathNode t) # |

Instance details

Defined in Language.PureScript.AST.Declarations

type Rep (PathNode t) = D1 ('MetaData "PathNode" "Language.PureScript.AST.Declarations" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "Leaf" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 t)) :+: C1 ('MetaCons "Branch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PathTree t))))

newtype AssocList k t #

Constructors

AssocList |

Fields

- runAssocList :: [(k, t)]

#### Instances

Instances details

Functor (AssocList k) # |
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) # |

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 #

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) # |
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) #
(NFData k, NFData t) => NFData (AssocList k t) # |
Instance details Defined in Language.PureScript.AST.Declarations Methods rnf :: AssocList k t -> () #
(Show k, Show t) => Show (AssocList k t) # |
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 #
(Eq k, Eq t) => Eq (AssocList k t) # |
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) # |

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 #

isTrueExpr :: Expr -> Bool #

isAnonymousArgument :: Expr -> Bool #