purescript-0.15.12: PureScript Programming Language Compiler

Safe Haskell | Safe-Inferred
Language | Haskell2010

Language.PureScript

Description

The main compiler module

Synopsis

- data Literal a
  - = NumericLiteral (Either Integer Double)
  - | StringLiteral PSString
  - | CharLiteral Char
  - | BooleanLiteral Bool
  - | ArrayLiteral [a]
  - | ObjectLiteral [(PSString, a)]
- data Module = Module SourceSpan [Comment] ModuleName [Declaration] (Maybe [DeclarationRef])
- data Type a
  - = TUnknown a Int
  - | TypeVar a Text
  - | TypeLevelString a PSString
  - | TypeLevelInt a Integer
  - | TypeWildcard a WildcardData
  - | TypeConstructor a (Qualified (ProperName 'TypeName))
  - | TypeOp a (Qualified (OpName 'TypeOpName))
  - | TypeApp a (Type a) (Type a)
  - | KindApp a (Type a) (Type a)
  - | ForAll a TypeVarVisibility Text (Maybe (Type a)) (Type a) (Maybe SkolemScope)
  - | ConstrainedType a (Constraint a) (Type a)
  - | Skolem a Text (Maybe (Type a)) Int SkolemScope
  - | REmpty a
  - | RCons a Label (Type a) (Type a)
  - | KindedType a (Type a) (Type a)
  - | BinaryNoParensType a (Type a) (Type a) (Type a)
  - | ParensInType a (Type a)
- data Constraint a = Constraint {
  - constraintAnn :: a
  - constraintClass :: Qualified (ProperName 'ClassName)
  - constraintKindArgs :: [Type a]
  - constraintArgs :: [Type a]
  - constraintData :: Maybe ConstraintData
  }
- data Options = Options {
  - optionsVerboseErrors :: Bool
  - optionsNoComments :: Bool
  - optionsCodegenTargets :: Set CodegenTarget
  }
- data Text
- data Name
  - = IdentName Ident
  - | ValOpName (OpName 'ValueOpName)
  - | TyName (ProperName 'TypeName)
  - | TyOpName (OpName 'TypeOpName)
  - | DctorName (ProperName 'ConstructorName)
  - | TyClassName (ProperName 'ClassName)
  - | ModName ModuleName
- data Ident
  - = Ident Text
  - | GenIdent (Maybe Text) Integer
  - | UnusedIdent
  - | InternalIdent !InternalIdentData
- type HasCallStack = ?callStack :: CallStack
- data ErrorMessage = ErrorMessage [ErrorMessageHint] SimpleErrorMessage
- data Comment
  - = LineComment Text
  - | BlockComment Text
- type Env = Map ModuleName (SourceSpan, Imports, Exports)
- type Context = [(Ident, SourceType)]
- data Level
  - = Error
  - | Warning
- data Role
  - = Nominal
  - | Representational
  - | Phantom
- data Environment = Environment {
  - names :: Map (Qualified Ident) (SourceType, NameKind, NameVisibility)
  - types :: Map (Qualified (ProperName 'TypeName)) (SourceType, TypeKind)
  - dataConstructors :: Map (Qualified (ProperName 'ConstructorName)) (DataDeclType, ProperName 'TypeName, SourceType, [Ident])
  - typeSynonyms :: Map (Qualified (ProperName 'TypeName)) ([(Text, Maybe SourceType)], SourceType)
  - typeClassDictionaries :: Map QualifiedBy (Map (Qualified (ProperName 'ClassName)) (Map (Qualified Ident) (NonEmpty NamedDict)))
  - typeClasses :: Map (Qualified (ProperName 'ClassName)) TypeClassData
  }
- data Associativity
  - = Infixl
  - | Infixr
  - | Infix
- data Fixity = Fixity Associativity Precedence
- data Substitution = Substitution {
  - substType :: Map Int SourceType
  - substUnsolved :: Map Int (UnkLevel, SourceType)
  - substNames :: Map Int Text
  }
- data TypeMap = TypeMap {
  - umSkolemMap :: Map Int (String, Int, Maybe SourceSpan)
  - umUnknownMap :: Map Int Int
  - umNextIndex :: Int
  }
- type Unknown = Int
- type Supply = SupplyT Identity
- newtype SupplyT m a = SupplyT {
  - unSupplyT :: StateT Integer m a
  }
- newtype Make a = Make {
  - unMake :: ReaderT Options (ExceptT MultipleErrors (Logger MultipleErrors)) a
  }
- data SourcePos = SourcePos {
  - sourcePosLine :: Int
  - sourcePosColumn :: Int
  }
- data SourceSpan = SourceSpan {
  - spanName :: String
  - spanStart :: SourcePos
  - spanEnd :: SourcePos
  }
- newtype OpName (a :: OpNameType) = OpName {
  - runOpName :: Text
  }
- data OpNameType
  - = ValueOpName
  - | TypeOpName
  - | AnyOpName
- newtype ProperName (a :: ProperNameType) = ProperName {
  - runProperName :: Text
  }
- data ProperNameType
  - = TypeName
  - | ConstructorName
  - | ClassName
  - | Namespace
- data Qualified a = Qualified QualifiedBy a
- type SourceType = Type SourceAnn
- data Binder
  - = NullBinder
  - | LiteralBinder SourceSpan (Literal Binder)
  - | VarBinder SourceSpan Ident
  - | ConstructorBinder SourceSpan (Qualified (ProperName 'ConstructorName)) [Binder]
  - | OpBinder SourceSpan (Qualified (OpName 'ValueOpName))
  - | BinaryNoParensBinder Binder Binder Binder
  - | ParensInBinder Binder
  - | NamedBinder SourceSpan Ident Binder
  - | PositionedBinder SourceSpan [Comment] Binder
  - | TypedBinder SourceType Binder
- type SourceAnn = (SourceSpan, [Comment])
- type SourceConstraint = Constraint SourceAnn
- newtype ModuleName = ModuleName Text
- data QualifiedBy
  - = BySourcePos SourcePos
  - | ByModuleName ModuleName
- data DataDeclType
  - = Data
  - | Newtype
- data FunctionalDependency = FunctionalDependency {
  - fdDeterminers :: [Int]
  - fdDetermined :: [Int]
  }
- data NameKind
  - = Private
  - | Public
  - | External
- data DataConstructorDeclaration = DataConstructorDeclaration {
  - dataCtorAnn :: !SourceAnn
  - dataCtorName :: !(ProperName 'ConstructorName)
  - dataCtorFields :: ![(Ident, SourceType)]
  }
- 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 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 CaseAlternative = CaseAlternative {
  - caseAlternativeBinders :: [Binder]
  - caseAlternativeResult :: [GuardedExpr]
  }
- data DoNotationElement
  - = DoNotationValue Expr
  - | DoNotationBind Binder Expr
  - | DoNotationLet [Declaration]
  - | PositionedDoNotationElement SourceSpan [Comment] DoNotationElement
- 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 Guard
  - = ConditionGuard Expr
  - | PatternGuard Binder Expr
- data GuardedExpr = GuardedExpr [Guard] Expr
- data TypeDeclarationData = TypeDeclarationData {
  - tydeclSourceAnn :: !SourceAnn
  - tydeclIdent :: !Ident
  - tydeclType :: !SourceType
  }
- data TypeInstanceBody
  - = DerivedInstance
  - | NewtypeInstance
  - | ExplicitInstance [Declaration]
- data ValueDeclarationData a = ValueDeclarationData {
  - valdeclSourceAnn :: !SourceAnn
  - valdeclIdent :: !Ident
  - valdeclName :: !NameKind
  - valdeclBinders :: ![Binder]
  - valdeclExpression :: !a
  }
- 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 SimpleErrorMessage
  - = InternalCompilerError Text Text
  - | ModuleNotFound ModuleName
  - | ErrorParsingFFIModule FilePath (Maybe ErrorMessage)
  - | ErrorParsingCSTModule ParserError
  - | WarningParsingCSTModule ParserWarning
  - | MissingFFIModule ModuleName
  - | UnnecessaryFFIModule ModuleName FilePath
  - | MissingFFIImplementations ModuleName [Ident]
  - | UnusedFFIImplementations ModuleName [Ident]
  - | InvalidFFIIdentifier ModuleName Text
  - | DeprecatedFFIPrime ModuleName Text
  - | DeprecatedFFICommonJSModule ModuleName FilePath
  - | UnsupportedFFICommonJSExports ModuleName [Text]
  - | UnsupportedFFICommonJSImports ModuleName [Text]
  - | FileIOError Text IOError
  - | InfiniteType SourceType
  - | InfiniteKind SourceType
  - | MultipleValueOpFixities (OpName 'ValueOpName)
  - | MultipleTypeOpFixities (OpName 'TypeOpName)
  - | OrphanTypeDeclaration Ident
  - | OrphanKindDeclaration (ProperName 'TypeName)
  - | OrphanRoleDeclaration (ProperName 'TypeName)
  - | RedefinedIdent Ident
  - | OverlappingNamesInLet Ident
  - | UnknownName (Qualified Name)
  - | UnknownImport ModuleName Name
  - | UnknownImportDataConstructor ModuleName (ProperName 'TypeName) (ProperName 'ConstructorName)
  - | UnknownExport Name
  - | UnknownExportDataConstructor (ProperName 'TypeName) (ProperName 'ConstructorName)
  - | ScopeConflict Name [ModuleName]
  - | ScopeShadowing Name (Maybe ModuleName) [ModuleName]
  - | DeclConflict Name Name
  - | ExportConflict (Qualified Name) (Qualified Name)
  - | DuplicateModule ModuleName
  - | DuplicateTypeClass (ProperName 'ClassName) SourceSpan
  - | DuplicateInstance Ident SourceSpan
  - | DuplicateTypeArgument Text
  - | InvalidDoBind
  - | InvalidDoLet
  - | CycleInDeclaration Ident
  - | CycleInTypeSynonym (NonEmpty (ProperName 'TypeName))
  - | CycleInTypeClassDeclaration (NonEmpty (Qualified (ProperName 'ClassName)))
  - | CycleInKindDeclaration (NonEmpty (Qualified (ProperName 'TypeName)))
  - | CycleInModules (NonEmpty ModuleName)
  - | NameIsUndefined Ident
  - | UndefinedTypeVariable (ProperName 'TypeName)
  - | PartiallyAppliedSynonym (Qualified (ProperName 'TypeName))
  - | EscapedSkolem Text (Maybe SourceSpan) SourceType
  - | TypesDoNotUnify SourceType SourceType
  - | KindsDoNotUnify SourceType SourceType
  - | ConstrainedTypeUnified SourceType SourceType
  - | OverlappingInstances (Qualified (ProperName 'ClassName)) [SourceType] [Qualified (Either SourceType Ident)]
  - | NoInstanceFound SourceConstraint [Qualified (Either SourceType Ident)] Bool
  - | AmbiguousTypeVariables SourceType [(Text, Int)]
  - | UnknownClass (Qualified (ProperName 'ClassName))
  - | PossiblyInfiniteInstance (Qualified (ProperName 'ClassName)) [SourceType]
  - | PossiblyInfiniteCoercibleInstance
  - | CannotDerive (Qualified (ProperName 'ClassName)) [SourceType]
  - | InvalidDerivedInstance (Qualified (ProperName 'ClassName)) [SourceType] Int
  - | ExpectedTypeConstructor (Qualified (ProperName 'ClassName)) [SourceType] SourceType
  - | InvalidNewtypeInstance (Qualified (ProperName 'ClassName)) [SourceType]
  - | MissingNewtypeSuperclassInstance (Qualified (ProperName 'ClassName)) (Qualified (ProperName 'ClassName)) [SourceType]
  - | UnverifiableSuperclassInstance (Qualified (ProperName 'ClassName)) (Qualified (ProperName 'ClassName)) [SourceType]
  - | CannotFindDerivingType (ProperName 'TypeName)
  - | DuplicateLabel Label (Maybe Expr)
  - | DuplicateValueDeclaration Ident
  - | ArgListLengthsDiffer Ident
  - | OverlappingArgNames (Maybe Ident)
  - | MissingClassMember (NonEmpty (Ident, SourceType))
  - | ExtraneousClassMember Ident (Qualified (ProperName 'ClassName))
  - | ExpectedType SourceType SourceType
  - | IncorrectConstructorArity (Qualified (ProperName 'ConstructorName)) Int Int
  - | ExprDoesNotHaveType Expr SourceType
  - | PropertyIsMissing Label
  - | AdditionalProperty Label
  - | OrphanInstance Ident (Qualified (ProperName 'ClassName)) (Set ModuleName) [SourceType]
  - | InvalidNewtype (ProperName 'TypeName)
  - | InvalidInstanceHead SourceType
  - | TransitiveExportError DeclarationRef [DeclarationRef]
  - | TransitiveDctorExportError DeclarationRef [ProperName 'ConstructorName]
  - | HiddenConstructors DeclarationRef (Qualified (ProperName 'ClassName))
  - | ShadowedName Ident
  - | ShadowedTypeVar Text
  - | UnusedTypeVar Text
  - | UnusedName Ident
  - | UnusedDeclaration Ident
  - | WildcardInferredType SourceType Context
  - | HoleInferredType Text SourceType Context (Maybe TypeSearch)
  - | MissingTypeDeclaration Ident SourceType
  - | MissingKindDeclaration KindSignatureFor (ProperName 'TypeName) SourceType
  - | OverlappingPattern [[Binder]] Bool
  - | IncompleteExhaustivityCheck
  - | ImportHidingModule ModuleName
  - | UnusedImport ModuleName (Maybe ModuleName)
  - | UnusedExplicitImport ModuleName [Name] (Maybe ModuleName) [DeclarationRef]
  - | UnusedDctorImport ModuleName (ProperName 'TypeName) (Maybe ModuleName) [DeclarationRef]
  - | UnusedDctorExplicitImport ModuleName (ProperName 'TypeName) [ProperName 'ConstructorName] (Maybe ModuleName) [DeclarationRef]
  - | DuplicateSelectiveImport ModuleName
  - | DuplicateImport ModuleName ImportDeclarationType (Maybe ModuleName)
  - | DuplicateImportRef Name
  - | DuplicateExportRef Name
  - | IntOutOfRange Integer Text Integer Integer
  - | ImplicitQualifiedImport ModuleName ModuleName [DeclarationRef]
  - | ImplicitQualifiedImportReExport ModuleName ModuleName [DeclarationRef]
  - | ImplicitImport ModuleName [DeclarationRef]
  - | HidingImport ModuleName [DeclarationRef]
  - | CaseBinderLengthDiffers Int [Binder]
  - | IncorrectAnonymousArgument
  - | InvalidOperatorInBinder (Qualified (OpName 'ValueOpName)) (Qualified Ident)
  - | CannotGeneralizeRecursiveFunction Ident SourceType
  - | CannotDeriveNewtypeForData (ProperName 'TypeName)
  - | ExpectedWildcard (ProperName 'TypeName)
  - | CannotUseBindWithDo Ident
  - | ClassInstanceArityMismatch Ident (Qualified (ProperName 'ClassName)) Int Int
  - | UserDefinedWarning SourceType
  - | UnusableDeclaration Ident [[Text]]
  - | CannotDefinePrimModules ModuleName
  - | MixedAssociativityError (NonEmpty (Qualified (OpName 'AnyOpName), Associativity))
  - | NonAssociativeError (NonEmpty (Qualified (OpName 'AnyOpName)))
  - | QuantificationCheckFailureInKind Text
  - | QuantificationCheckFailureInType [Int] SourceType
  - | VisibleQuantificationCheckFailureInType Text
  - | UnsupportedTypeInKind SourceType
  - | RoleMismatch Text Role Role
  - | InvalidCoercibleInstanceDeclaration [SourceType]
  - | UnsupportedRoleDeclaration
  - | RoleDeclarationArityMismatch (ProperName 'TypeName) Int Int
  - | DuplicateRoleDeclaration (ProperName 'TypeName)
  - | CannotDeriveInvalidConstructorArg (Qualified (ProperName 'ClassName)) [Qualified (ProperName 'ClassName)] Bool
  - | CannotSkipTypeApplication SourceType
  - | CannotApplyExpressionOfTypeOnType SourceType SourceType
- newtype MultipleErrors = MultipleErrors {
  - runMultipleErrors :: [ErrorMessage]
  }
- data CodegenTarget
  - = JS
  - | JSSourceMap
  - | CoreFn
  - | Docs
- data InternalIdentData
  - = RuntimeLazyFactory
  - | Lazy !Text
- data RebracketCaller
  - = CalledByCompile
  - | CalledByDocs
- type PrettyPrintConstraint = (Qualified (ProperName 'ClassName), [PrettyPrintType], [PrettyPrintType])
- data PrettyPrintType
  - = PPTUnknown Int
  - | PPTypeVar Text (Maybe Text)
  - | PPTypeLevelString PSString
  - | PPTypeLevelInt Integer
  - | PPTypeWildcard (Maybe Text)
  - | PPTypeConstructor (Qualified (ProperName 'TypeName))
  - | PPTypeOp (Qualified (OpName 'TypeOpName))
  - | PPSkolem Text Int
  - | PPTypeApp PrettyPrintType PrettyPrintType
  - | PPKindArg PrettyPrintType
  - | PPConstrainedType PrettyPrintConstraint PrettyPrintType
  - | PPKindedType PrettyPrintType PrettyPrintType
  - | PPBinaryNoParensType PrettyPrintType PrettyPrintType PrettyPrintType
  - | PPParensInType PrettyPrintType
  - | PPForAll [(TypeVarVisibility, Text, Maybe PrettyPrintType)] PrettyPrintType
  - | PPFunction PrettyPrintType PrettyPrintType
  - | PPRecord [(Label, PrettyPrintType)] (Maybe PrettyPrintType)
  - | PPRow [(Label, PrettyPrintType)] (Maybe PrettyPrintType)
  - | PPTruncated
- data TypeVarVisibility
  - = TypeVarVisible
  - | TypeVarInvisible
- data ConstraintData = PartialConstraintData [[Text]] Bool
- data RowListItem a = RowListItem {
  - rowListAnn :: a
  - rowListLabel :: Label
  - rowListType :: Type a
  }
- data ExternsFile = ExternsFile {
  - efVersion :: Text
  - efModuleName :: ModuleName
  - efExports :: [DeclarationRef]
  - efImports :: [ExternsImport]
  - efFixities :: [ExternsFixity]
  - efTypeFixities :: [ExternsTypeFixity]
  - efDeclarations :: [ExternsDeclaration]
  - efSourceSpan :: SourceSpan
  }
- data ExternsImport = ExternsImport {
  - eiModule :: ModuleName
  - eiImportType :: ImportDeclarationType
  - eiImportedAs :: Maybe ModuleName
  }
- data ExternsFixity = ExternsFixity {
  - efAssociativity :: Associativity
  - efPrecedence :: Precedence
  - efOperator :: OpName 'ValueOpName
  - efAlias :: Qualified (Either Ident (ProperName 'ConstructorName))
  }
- data ExternsTypeFixity = ExternsTypeFixity {
  - efTypeAssociativity :: Associativity
  - efTypePrecedence :: Precedence
  - efTypeOperator :: OpName 'TypeOpName
  - efTypeAlias :: Qualified (ProperName 'TypeName)
  }
- data ExternsDeclaration
  - = EDType {
    - edTypeName :: ProperName 'TypeName
    - edTypeKind :: SourceType
    - edTypeDeclarationKind :: TypeKind
    }
  - | EDTypeSynonym {
    - edTypeSynonymName :: ProperName 'TypeName
    - edTypeSynonymArguments :: [(Text, Maybe SourceType)]
    - edTypeSynonymType :: SourceType
    }
  - | EDDataConstructor {
    - edDataCtorName :: ProperName 'ConstructorName
    - edDataCtorOrigin :: DataDeclType
    - edDataCtorTypeCtor :: ProperName 'TypeName
    - edDataCtorType :: SourceType
    - edDataCtorFields :: [Ident]
    }
  - | EDValue {
    - edValueName :: Ident
    - edValueType :: SourceType
    }
  - | EDClass {
    - edClassName :: ProperName 'ClassName
    - edClassTypeArguments :: [(Text, Maybe SourceType)]
    - edClassMembers :: [(Ident, SourceType)]
    - edClassConstraints :: [SourceConstraint]
    - edFunctionalDependencies :: [FunctionalDependency]
    - edIsEmpty :: Bool
    }
  - | EDInstance {
    - edInstanceClassName :: Qualified (ProperName 'ClassName)
    - edInstanceName :: Ident
    - edInstanceForAll :: [(Text, SourceType)]
    - edInstanceKinds :: [SourceType]
    - edInstanceTypes :: [SourceType]
    - edInstanceConstraints :: Maybe [SourceConstraint]
    - edInstanceChain :: Maybe ChainId
    - edInstanceChainIndex :: Integer
    - edInstanceNameSource :: NameSource
    - edInstanceSourceSpan :: SourceSpan
    }
- data ImportDeclarationType
  - = Implicit
  - | Explicit [DeclarationRef]
  - | Hiding [DeclarationRef]
- data NameSource
  - = UserNamed
  - | CompilerNamed
- type Precedence = Integer
- data NameVisibility
  - = Undefined
  - | Defined
- data TypeClassData = TypeClassData {
  - typeClassArguments :: [(Text, Maybe SourceType)]
  - typeClassMembers :: [(Ident, SourceType)]
  - typeClassSuperclasses :: [SourceConstraint]
  - typeClassDependencies :: [FunctionalDependency]
  - typeClassDeterminedArguments :: Set Int
  - typeClassCoveringSets :: Set (Set Int)
  - typeClassIsEmpty :: Bool
  }
- data TypeKind
  - = DataType DataDeclType [(Text, Maybe SourceType, Role)] [(ProperName 'ConstructorName, [SourceType])]
  - | TypeSynonym
  - | ExternData [Role]
  - | LocalTypeVariable
  - | ScopedTypeVar
- data Imports = Imports {
  - importedTypes :: ImportMap (ProperName 'TypeName)
  - importedTypeOps :: ImportMap (OpName 'TypeOpName)
  - importedDataConstructors :: ImportMap (ProperName 'ConstructorName)
  - importedTypeClasses :: ImportMap (ProperName 'ClassName)
  - importedValues :: ImportMap Ident
  - importedValueOps :: ImportMap (OpName 'ValueOpName)
  - importedModules :: Set ModuleName
  - importedQualModules :: Set ModuleName
  - importedKinds :: ImportMap (ProperName 'TypeName)
  }
- type UsedImports = Map ModuleName [Qualified Name]
- data ExportSource = ExportSource {
  - exportSourceImportedFrom :: Maybe ModuleName
  - exportSourceDefinedIn :: ModuleName
  }
- data Exports = Exports {
  - exportedTypes :: Map (ProperName 'TypeName) ([ProperName 'ConstructorName], ExportSource)
  - exportedTypeOps :: Map (OpName 'TypeOpName) ExportSource
  - exportedTypeClasses :: Map (ProperName 'ClassName) ExportSource
  - exportedValues :: Map Ident ExportSource
  - exportedValueOps :: Map (OpName 'ValueOpName) ExportSource
  }
- data ImportRecord a = ImportRecord {
  - importName :: Qualified a
  - importSourceModule :: ModuleName
  - importSourceSpan :: SourceSpan
  - importProvenance :: ImportProvenance
  }
- data WildcardData
  - = HoleWildcard Text
  - | UnnamedWildcard
  - | IgnoredWildcard
- data DependencyDepth
  - = Direct
  - | Transitive
- data CheckState = CheckState {
  - checkEnv :: Environment
  - checkNextType :: Int
  - checkNextSkolem :: Int
  - checkNextSkolemScope :: Int
  - checkCurrentModule :: Maybe ModuleName
  - checkCurrentModuleImports :: [(SourceAnn, ModuleName, ImportDeclarationType, Maybe ModuleName, Map (ProperName 'TypeName) ([ProperName 'ConstructorName], ExportSource))]
  - checkSubstitution :: Substitution
  - checkHints :: [ErrorMessageHint]
  - checkConstructorImportsForCoercible :: Set (ModuleName, Qualified (ProperName 'ConstructorName))
  }
- data MakeActions m = MakeActions {
  - getInputTimestampsAndHashes :: ModuleName -> m (Either RebuildPolicy (Map FilePath (UTCTime, m ContentHash)))
  - getOutputTimestamp :: ModuleName -> m (Maybe UTCTime)
  - readExterns :: ModuleName -> m (FilePath, Maybe ExternsFile)
  - codegen :: Module Ann -> Module -> ExternsFile -> SupplyT m ()
  - ffiCodegen :: Module Ann -> m ()
  - progress :: ProgressMessage -> m ()
  - readCacheDb :: m CacheDb
  - writeCacheDb :: CacheDb -> m ()
  - writePackageJson :: m ()
  - outputPrimDocs :: m ()
  }
- data RebuildPolicy
  - = RebuildNever
  - | RebuildAlways
- data ProgressMessage = CompilingModule ModuleName (Maybe (Int, Int))
- type ModuleGraph = [(ModuleName, [ModuleName])]
- data ModuleSignature = ModuleSignature {
  - sigSourceSpan :: SourceSpan
  - sigModuleName :: ModuleName
  - sigImports :: [(ModuleName, SourceSpan)]
  }
- newtype AssocList k t = AssocList {
  - runAssocList :: [(k, t)]
  }
- data PathNode t
  - = Leaf t
  - | Branch (PathTree t)
- newtype PathTree t = PathTree (AssocList PSString (PathNode t))
- data WhereProvenance
  - = FromWhere
  - | FromLet
- data ImportProvenance
  - = FromImplicit
  - | FromExplicit
  - | Local
  - | Prim
- data KindSignatureFor
  - = DataSig
  - | NewtypeSig
  - | TypeSynonymSig
  - | ClassSig
- data RoleDeclarationData = RoleDeclarationData {
  - rdeclSourceAnn :: !SourceAnn
  - rdeclIdent :: !(ProperName 'TypeName)
  - rdeclRoles :: ![Role]
  }
- data InstanceDerivationStrategy
  - = KnownClassStrategy
  - | NewtypeStrategy
- newtype UnkLevel = UnkLevel (NonEmpty Unknown)
- newtype SkolemScope = SkolemScope {
  - runSkolemScope :: Int
  }
- type SynonymMap = Map (Qualified (ProperName 'TypeName)) ([(Text, Maybe SourceType)], SourceType)
- type KindMap = Map (Qualified (ProperName 'TypeName)) (SourceType, TypeKind)
- data BindingGroupType
  - = RecursiveBindingGroup
  - | NonRecursiveBindingGroup
- data TypeSearch
  - = TSBefore Environment
  - | TSAfter {
    - tsAfterIdentifiers :: [(Qualified Text, SourceType)]
    - tsAfterRecordFields :: Maybe [(Label, SourceType)]
    }
- type Frontier = Map IntSet (First (IntMap (NonEmpty IntSet)))
- data HintCategory
  - = ExprHint
  - | KindHint
  - | CheckHint
  - | PositionHint
  - | SolverHint
  - | DeclarationHint
  - | OtherHint
- data ValueFixity = ValueFixity Fixity (Qualified (Either Ident (ProperName 'ConstructorName))) (OpName 'ValueOpName)
- data TypeFixity = TypeFixity Fixity (Qualified (ProperName 'TypeName)) (OpName 'TypeOpName)
- data ScopedIdent
  - = LocalIdent Ident
  - | ToplevelIdent Ident
- newtype ErrorSuggestion = ErrorSuggestion Text
- data PPEOptions = PPEOptions {
  - ppeCodeColor :: Maybe (ColorIntensity, Color)
  - ppeFull :: Bool
  - ppeLevel :: Level
  - ppeShowDocs :: Bool
  - ppeRelativeDirectory :: FilePath
  - ppeFileContents :: [(FilePath, Text)]
  }
- pattern ByNullSourcePos :: QualifiedBy
- pattern ValueDecl :: SourceAnn -> Ident -> NameKind -> [Binder] -> [GuardedExpr] -> Declaration
- pattern MkUnguarded :: Expr -> GuardedExpr
- pattern NullSourceSpan :: SourceSpan
- pattern REmptyKinded :: forall a. a -> Maybe (Type a) -> Type a
- pattern TypeFixityDeclaration :: SourceAnn -> Fixity -> Qualified (ProperName 'TypeName) -> OpName 'TypeOpName -> Declaration
- pattern ValueFixityDeclaration :: SourceAnn -> Fixity -> Qualified (Either Ident (ProperName 'ConstructorName)) -> OpName 'ValueOpName -> Declaration
- pattern NullSourceAnn :: SourceAnn
- function :: SourceType -> SourceType -> SourceType
- defaultOptions :: Options
- internalError :: HasCallStack => String -> a
- renderBox :: Box -> String
- line :: Text -> Box
- errorMessage :: SimpleErrorMessage -> MultipleErrors
- copyFile :: (MonadIO m, MonadError MultipleErrors m) => FilePath -> FilePath -> m ()
- nonEmpty :: MultipleErrors -> Bool
- toMaybeModuleName :: QualifiedBy -> Maybe ModuleName
- exportedDeclarations :: Module -> [Declaration]
- isExported :: Maybe [DeclarationRef] -> Declaration -> Bool
- declName :: Declaration -> Maybe Name
- declRefName :: DeclarationRef -> Name
- flattenDecls :: [Declaration] -> [Declaration]
- everythingOnTypes :: (r -> r -> r) -> (Type a -> r) -> Type a -> r
- coerceProperName :: ProperName a -> ProperName b
- disqualify :: Qualified a -> a
- isQualified :: Qualified a -> Bool
- isQualifiedWith :: ModuleName -> Qualified a -> Bool
- binderNames :: Binder -> [Ident]
- mapTypeInstanceBody :: ([Declaration] -> [Declaration]) -> TypeInstanceBody -> TypeInstanceBody
- traverseTypeInstanceBody :: Applicative f => ([Declaration] -> f [Declaration]) -> TypeInstanceBody -> f TypeInstanceBody
- mapConstraintArgs :: ([Type a] -> [Type a]) -> Constraint a -> Constraint a
- guardedExprM :: Applicative m => (Guard -> m Guard) -> (Expr -> m Expr) -> GuardedExpr -> m GuardedExpr
- nullSourceSpan :: SourceSpan
- byMaybeModuleName :: Maybe ModuleName -> QualifiedBy
- displayStartEndPos :: SourceSpan -> Text
- rethrow :: MonadError e m => (e -> e) -> m a -> m a
- errorMessage' :: SourceSpan -> SimpleErrorMessage -> MultipleErrors
- rethrowWithPosition :: MonadError MultipleErrors m => SourceSpan -> m a -> m a
- addHint :: ErrorMessageHint -> MultipleErrors -> MultipleErrors
- runIdent :: Ident -> Text
- runModuleName :: ModuleName -> Text
- showIdent :: Ident -> Text
- showQualified :: (a -> Text) -> Qualified a -> Text
- unusedIdent :: Text
- everywhereOnValues :: (Declaration -> Declaration) -> (Expr -> Expr) -> (Binder -> Binder) -> (Declaration -> Declaration, Expr -> Expr, Binder -> Binder)
- dictTypeName :: ProperName a -> ProperName a
- freshIdent :: MonadSupply m => Text -> m Ident
- everythingOnValues :: forall r. (r -> r -> r) -> (Declaration -> r) -> (Expr -> r) -> (Binder -> r) -> (CaseAlternative -> r) -> (DoNotationElement -> r) -> (Declaration -> r, Expr -> r, Binder -> r, CaseAlternative -> r, DoNotationElement -> r)
- isDictTypeName :: ProperName a -> Bool
- lookupConstructor :: Environment -> Qualified (ProperName 'ConstructorName) -> (DataDeclType, ProperName 'TypeName, SourceType, [Ident])
- lookupValue :: Environment -> Qualified Ident -> Maybe (SourceType, NameKind, NameVisibility)
- getQual :: Qualified a -> Maybe ModuleName
- evalSupplyT :: Functor m => Integer -> SupplyT m a -> m a
- convertPrettyPrintType :: Int -> Type a -> PrettyPrintType
- prettyPrintLabel :: Label -> Text
- displayRole :: Role -> Text
- typeVarVisibilityPrefix :: TypeVarVisibility -> Text
- prettyPrintString :: PSString -> Text
- moduleNameFromString :: Text -> ModuleName
- nullSourceAnn :: SourceAnn
- eqType :: Type a -> Type b -> Bool
- srcTypeConstructor :: Qualified (ProperName 'TypeName) -> SourceType
- prettyPrintBinderAtom :: Binder -> Text
- prettyPrintObjectKey :: PSString -> Text
- prettyPrintSuggestedType :: Type a -> String
- prettyPrintValue :: Int -> Expr -> Box
- typeAsBox :: Int -> Type a -> Box
- typeAtomAsBox :: Int -> Type a -> Box
- typeDiffAsBox :: Int -> Type a -> Box
- eraseForAllKindAnnotations :: Type a -> Type a
- eraseKindApps :: Type a -> Type a
- everywhereOnTypesTopDownM :: Monad m => (Type a -> m (Type a)) -> Type a -> m (Type a)
- getAnnForType :: Type a -> a
- isMonoType :: Type a -> Bool
- overConstraintArgs :: Functor f => ([Type a] -> f [Type a]) -> Constraint a -> f (Constraint a)
- rowFromList :: ([RowListItem a], Type a) -> Type a
- rowToList :: Type a -> ([RowListItem a], Type a)
- srcTUnknown :: Int -> SourceType
- externsIsCurrentVersion :: ExternsFile -> Bool
- moduleToExternsFile :: Module -> Environment -> Map Ident Ident -> ExternsFile
- applyExternsFileToEnvironment :: ExternsFile -> Environment -> Environment
- externsFileName :: FilePath
- getTypeOpRef :: DeclarationRef -> Maybe (OpName 'TypeOpName)
- getValueOpRef :: DeclarationRef -> Maybe (OpName 'ValueOpName)
- makeTypeClassData :: [(Text, Maybe SourceType)] -> [(Ident, SourceType)] -> [SourceConstraint] -> [FunctionalDependency] -> Bool -> TypeClassData
- isPlainIdent :: Ident -> Bool
- srcInstanceType :: SourceSpan -> [(Text, SourceType)] -> Qualified (ProperName 'ClassName) -> [SourceType] -> SourceType
- graph :: [FilePath] -> IO (Either MultipleErrors Value, MultipleErrors)
- ffiCodegen' :: Map ModuleName FilePath -> Set CodegenTarget -> Maybe (ModuleName -> String -> FilePath) -> Module Ann -> Make ()
- cacheDbFile :: FilePath -> FilePath
- make :: forall m. (MonadBaseControl IO m, MonadError MultipleErrors m, MonadWriter MultipleErrors m) => MakeActions m -> [PartialResult Module] -> m [ExternsFile]
- runMake :: Options -> Make a -> IO (Either MultipleErrors a, MultipleErrors)
- lint :: forall m. MonadWriter MultipleErrors m => Module -> m ()
- getIdentName :: Name -> Maybe Ident
- everythingWithContextOnTypes :: s -> r -> (r -> r -> r) -> (s -> Type a -> (s, r)) -> Type a -> r
- checkExhaustiveExpr :: forall m. MonadWriter MultipleErrors m => SourceSpan -> Environment -> ModuleName -> Expr -> m Expr
- isTrueExpr :: Expr -> Bool
- everywhereOnValuesM :: forall m. Monad m => (Declaration -> m Declaration) -> (Expr -> m Expr) -> (Binder -> m Binder) -> (Declaration -> m Declaration, Expr -> m Expr, Binder -> m Binder)
- lintImports :: forall m. MonadWriter MultipleErrors m => Module -> Env -> UsedImports -> m ()
- getTypeRef :: DeclarationRef -> Maybe (ProperName 'TypeName, Maybe [ProperName 'ConstructorName])
- isExplicit :: ImportDeclarationType -> Bool
- everywhereWithContextOnValues :: forall s. s -> (s -> Declaration -> (s, Declaration)) -> (s -> Expr -> (s, Expr)) -> (s -> Binder -> (s, Binder)) -> (s -> CaseAlternative -> (s, CaseAlternative)) -> (s -> DoNotationElement -> (s, DoNotationElement)) -> (s -> Guard -> (s, Guard)) -> (Declaration -> Declaration, Expr -> Expr, Binder -> Binder, CaseAlternative -> CaseAlternative, DoNotationElement -> DoNotationElement, Guard -> Guard)
- everywhereOnTypes :: (Type a -> Type a) -> Type a -> Type a
- rebuildModule :: forall m. (MonadBaseControl IO m, MonadError MultipleErrors m, MonadWriter MultipleErrors m) => MakeActions m -> [ExternsFile] -> Module -> m ExternsFile
- rebuildModule' :: forall m. (MonadBaseControl IO m, MonadError MultipleErrors m, MonadWriter MultipleErrors m) => MakeActions m -> Env -> [ExternsFile] -> Module -> m ExternsFile
- inferForeignModules :: forall m. MonadIO m => Map ModuleName (Either RebuildPolicy FilePath) -> m (Map ModuleName FilePath)
- runSupply :: Integer -> Supply a -> (a, Integer)
- runSupplyT :: Integer -> SupplyT m a -> m (a, Integer)
- getModuleName :: Module -> ModuleName
- getModuleSourceSpan :: Module -> SourceSpan
- importPrim :: Module -> Module
- initEnvironment :: Environment
- defaultPPEOptions :: PPEOptions
- errorMessage'' :: NonEmpty SourceSpan -> SimpleErrorMessage -> MultipleErrors
- prettyPrintMultipleErrors :: PPEOptions -> MultipleErrors -> String
- moduleSignature :: Module -> ModuleSignature
- sortModules :: forall m a. MonadError MultipleErrors m => DependencyDepth -> (a -> ModuleSignature) -> [a] -> m ([a], ModuleGraph)
- isBuiltinModuleName :: ModuleName -> Bool
- renameInModule :: Module Ann -> (Map Ident Ident, Module Ann)
- collapseBindingGroups :: [Declaration] -> [Declaration]
- createBindingGroups :: forall m. MonadError MultipleErrors m => ModuleName -> [Declaration] -> m [Declaration]
- desugar :: MonadSupply m => MonadError MultipleErrors m => MonadWriter MultipleErrors m => MonadState (Env, UsedImports) m => [ExternsFile] -> Module -> m Module
- desugarCaseGuards :: forall m. (MonadSupply m, MonadError MultipleErrors m) => [Declaration] -> m [Declaration]
- externsEnv :: forall m. (MonadError MultipleErrors m, MonadWriter MultipleErrors m) => Env -> ExternsFile -> m Env
- primEnv :: Env
- emptyCheckState :: Environment -> CheckState
- typeCheckModule :: forall m. (MonadSupply m, MonadState CheckState m, MonadError MultipleErrors m, MonadWriter MultipleErrors m) => Map ModuleName Exports -> Module -> m Module
- renderProgressMessage :: Text -> ProgressMessage -> Text
- buildMakeActions :: FilePath -> Map ModuleName (Either RebuildPolicy FilePath) -> Map ModuleName FilePath -> Bool -> MakeActions Make
- checkForeignDecls :: Module ann -> FilePath -> Make (Either MultipleErrors (ForeignModuleType, Set Ident))
- readCacheDb' :: (MonadIO m, MonadError MultipleErrors m) => FilePath -> m CacheDb
- writeCacheDb' :: (MonadIO m, MonadError MultipleErrors m) => FilePath -> CacheDb -> m ()
- getTimestamp :: (MonadIO m, MonadError MultipleErrors m) => FilePath -> m UTCTime
- getTimestampMaybe :: (MonadIO m, MonadError MultipleErrors m) => FilePath -> m (Maybe UTCTime)
- hashFile :: (MonadIO m, MonadError MultipleErrors m) => FilePath -> m ContentHash
- makeIO :: (MonadIO m, MonadError MultipleErrors m) => Text -> IO a -> m a
- readExternsFile :: (MonadIO m, MonadError MultipleErrors m) => FilePath -> m (Maybe ExternsFile)
- readJSONFile :: (MonadIO m, MonadError MultipleErrors m) => FromJSON a => FilePath -> m (Maybe a)
- readTextFile :: (MonadIO m, MonadError MultipleErrors m) => FilePath -> m Text
- writeCborFile :: (MonadIO m, MonadError MultipleErrors m) => Serialise a => FilePath -> a -> m ()
- writeJSONFile :: (MonadIO m, MonadError MultipleErrors m) => ToJSON a => FilePath -> a -> m ()
- writeTextFile :: FilePath -> ByteString -> Make ()
- readJSONFileIO :: FromJSON a => FilePath -> IO (Maybe a)
- readCborFile :: (MonadIO m, MonadError MultipleErrors m) => Serialise a => FilePath -> m (Maybe a)
- readCborFileIO :: Serialise a => FilePath -> IO (Maybe a)
- writeCborFileIO :: Serialise a => FilePath -> a -> IO ()
- singleError :: ErrorMessage -> MultipleErrors
- parU :: forall m a b. MonadError MultipleErrors m => [a] -> (a -> m b) -> m [b]
- prettyPrintType :: Int -> Type a -> String
- prettyPrintTypeWithUnicode :: Int -> Type a -> String
- prettyPrintTypeAtom :: Int -> Type a -> String
- tyFunction :: SourceType
- tyRecord :: SourceType
- rowToSortedList :: Type a -> ([RowListItem a], Type a)
- prettyPrintBinder :: Binder -> Text
- isBySourcePos :: QualifiedBy -> Bool
- desugarAdoModule :: forall m. (MonadSupply m, MonadError MultipleErrors m) => Module -> m Module
- declSourceSpan :: Declaration -> SourceSpan
- freshIdent' :: MonadSupply m => m Ident
- createBindingGroupsModule :: MonadError MultipleErrors m => Module -> m Module
- positionedError :: SourceSpan -> ErrorMessageHint
- desugarCases :: forall m. (MonadSupply m, MonadError MultipleErrors m) => [Declaration] -> m [Declaration]
- desugarCasesModule :: (MonadSupply m, MonadError MultipleErrors m) => Module -> m Module
- withPosition :: SourceSpan -> ErrorMessage -> ErrorMessage
- guardWith :: MonadError e m => e -> Bool -> m ()
- desugarDoModule :: forall m. (MonadSupply m, MonadError MultipleErrors m) => Module -> m Module
- desugarLetPatternModule :: Module -> Module
- desugarImports :: forall m. (MonadError MultipleErrors m, MonadWriter MultipleErrors m, MonadState (Env, UsedImports) m) => Module -> m Module
- warnAndRethrow :: (MonadError e m, MonadWriter e m) => (e -> e) -> m a -> m a
- warnAndRethrowWithPosition :: (MonadError MultipleErrors m, MonadWriter MultipleErrors m) => SourceSpan -> m a -> m a
- everywhereOnTypesM :: Monad m => (Type a -> m (Type a)) -> Type a -> m (Type a)
- warnWithPosition :: MonadWriter MultipleErrors m => SourceSpan -> m a -> m a
- internalModuleSourceSpan :: String -> SourceSpan
- disqualifyFor :: Maybe ModuleName -> Qualified a -> Maybe a
- isUnqualified :: Qualified a -> Bool
- desugarObjectConstructors :: forall m. (MonadSupply m, MonadError MultipleErrors m) => Module -> m Module
- desugarDecl :: forall m. (MonadSupply m, MonadError MultipleErrors m) => Declaration -> m Declaration
- desugarSignedLiterals :: Module -> Module
- rebracket :: forall m. MonadError MultipleErrors m => MonadSupply m => [ExternsFile] -> Module -> m Module
- rebracketFiltered :: forall m. MonadError MultipleErrors m => MonadSupply m => RebracketCaller -> (Declaration -> Bool) -> [ExternsFile] -> Module -> m Module
- checkFixityExports :: forall m. MonadError MultipleErrors m => Module -> m Module
- eraseOpName :: OpName a -> OpName 'AnyOpName
- srcTypeApp :: SourceType -> SourceType -> SourceType
- desugarTypeClasses :: (MonadSupply m, MonadError MultipleErrors m) => [ExternsFile] -> Module -> m Module
- typeClassMemberName :: Declaration -> Text
- superClassDictionaryNames :: [Constraint a] -> [Text]
- primClasses :: Map (Qualified (ProperName 'ClassName)) TypeClassData
- primCoerceClasses :: Map (Qualified (ProperName 'ClassName)) TypeClassData
- primIntClasses :: Map (Qualified (ProperName 'ClassName)) TypeClassData
- primRowClasses :: Map (Qualified (ProperName 'ClassName)) TypeClassData
- primRowListClasses :: Map (Qualified (ProperName 'ClassName)) TypeClassData
- primSymbolClasses :: Map (Qualified (ProperName 'ClassName)) TypeClassData
- primTypeErrorClasses :: Map (Qualified (ProperName 'ClassName)) TypeClassData
- qualify :: ModuleName -> Qualified a -> (ModuleName, a)
- deriveInstances :: forall m. (MonadError MultipleErrors m, MonadSupply m) => Module -> m Module
- replaceAllTypeVars :: [(Text, Type a)] -> Type a -> Type a
- srcTypeLevelString :: PSString -> SourceType
- checkNewtype :: forall m. MonadError MultipleErrors m => ProperName 'TypeName -> [DataConstructorDeclaration] -> m (DataConstructorDeclaration, (Ident, SourceType))
- desugarTypeDeclarationsModule :: forall m. MonadError MultipleErrors m => Module -> m Module
- everywhereOnValuesTopDownM :: forall m. Monad m => (Declaration -> m Declaration) -> (Expr -> m Expr) -> (Binder -> m Binder) -> (Declaration -> m Declaration, Expr -> m Expr, Binder -> m Binder)
- kindArity :: Type a -> Int
- nominalRolesForKind :: Type a -> [Role]
- mkQualified :: a -> ModuleName -> Qualified a
- containsForAll :: Type a -> Bool
- freeTypeVariables :: Type a -> [Text]
- unapplyTypes :: Type a -> (Type a, [Type a], [Type a])
- kindType :: SourceType
- (-:>) :: SourceType -> SourceType -> SourceType
- internalCompilerError :: (MonadError MultipleErrors m, HasCallStack) => Text -> m a
- getEnv :: MonadState CheckState m => m Environment
- getTypeClassDictionaries :: MonadState CheckState m => m (Map QualifiedBy (Map (Qualified (ProperName 'ClassName)) (Map (Qualified Ident) (NonEmpty NamedDict))))
- unsafeCheckCurrentModule :: forall m. (MonadError MultipleErrors m, MonadState CheckState m) => m ModuleName
- replaceAllTypeSynonyms :: (e ~ MultipleErrors, MonadState CheckState m, MonadError e m) => SourceType -> m SourceType
- completeBinderList :: Type a -> Maybe ([(a, (Text, Type a))], Type a)
- srcTypeVar :: Text -> SourceType
- usedTypeVariables :: Type a -> [Text]
- kindRow :: SourceType -> SourceType
- tyBoolean :: SourceType
- tyInt :: SourceType
- tyString :: SourceType
- addHints :: [ErrorMessageHint] -> MultipleErrors -> MultipleErrors
- elaborateKind :: (MonadError MultipleErrors m, MonadState CheckState m, HasCallStack) => SourceType -> m SourceType
- unifyKinds' :: (MonadError MultipleErrors m, MonadState CheckState m, HasCallStack) => SourceType -> SourceType -> m ()
- withErrorMessageHint :: (MonadState CheckState m, MonadError MultipleErrors m) => ErrorMessageHint -> m a -> m a
- unapplyKinds :: Type a -> ([Type a], Type a)
- freshKindWithKind :: MonadState CheckState m => SourceSpan -> SourceType -> m SourceType
- lookupRoles :: Environment -> Qualified (ProperName 'TypeName) -> [Role]
- alignRowsWith :: (Label -> Type a -> Type a -> r) -> Type a -> Type a -> ([r], (([RowListItem a], Type a), ([RowListItem a], Type a)))
- containsUnknowns :: Type a -> Bool
- srcConstraint :: Qualified (ProperName 'ClassName) -> [SourceType] -> [SourceType] -> Maybe ConstraintData -> SourceConstraint
- kindOf :: (MonadError MultipleErrors m, MonadState CheckState m, HasCallStack) => SourceType -> m (SourceType, SourceType)
- kindOfWithUnknowns :: (MonadError MultipleErrors m, MonadState CheckState m, HasCallStack) => SourceType -> m (([(Unknown, SourceType)], SourceType), SourceType)
- kindOfWithScopedVars :: (MonadError MultipleErrors m, MonadState CheckState m, HasCallStack) => SourceType -> m (([(Text, SourceType)], SourceType), SourceType)
- kindOfData :: forall m. (MonadError MultipleErrors m, MonadState CheckState m) => ModuleName -> DataDeclarationArgs -> m DataDeclarationResult
- kindOfTypeSynonym :: forall m. (MonadError MultipleErrors m, MonadState CheckState m) => ModuleName -> TypeDeclarationArgs -> m TypeDeclarationResult
- kindOfClass :: forall m. (MonadError MultipleErrors m, MonadState CheckState m) => ModuleName -> ClassDeclarationArgs -> m ClassDeclarationResult
- kindsOfAll :: forall m. (MonadError MultipleErrors m, MonadState CheckState m) => ModuleName -> [TypeDeclarationArgs] -> [DataDeclarationArgs] -> [ClassDeclarationArgs] -> m ([TypeDeclarationResult], [DataDeclarationResult], [ClassDeclarationResult])
- unifyKinds :: (MonadError MultipleErrors m, MonadState CheckState m, HasCallStack) => SourceType -> SourceType -> m ()
- subsumesKind :: (MonadError MultipleErrors m, MonadState CheckState m, HasCallStack) => SourceType -> SourceType -> m ()
- instantiateKind :: (MonadError MultipleErrors m, MonadState CheckState m, HasCallStack) => (SourceType, SourceType) -> SourceType -> m SourceType
- checkKind :: (MonadError MultipleErrors m, MonadState CheckState m, HasCallStack) => SourceType -> SourceType -> m SourceType
- inferKind :: (MonadError MultipleErrors m, MonadState CheckState m, HasCallStack) => SourceType -> m (SourceType, SourceType)
- checkConstraint :: forall m. (MonadError MultipleErrors m, MonadState CheckState m) => SourceConstraint -> m SourceConstraint
- checkInstanceDeclaration :: forall m. (MonadError MultipleErrors m, MonadState CheckState m) => ModuleName -> InstanceDeclarationArgs -> m InstanceDeclarationResult
- checkKindDeclaration :: forall m. (MonadSupply m, MonadError MultipleErrors m, MonadState CheckState m) => ModuleName -> SourceType -> m SourceType
- checkTypeKind :: (MonadError MultipleErrors m, MonadState CheckState m, HasCallStack) => SourceType -> SourceType -> m ()
- unknownsWithKinds :: forall m. (MonadState CheckState m, MonadError MultipleErrors m, HasCallStack) => [Unknown] -> m [(Unknown, SourceType)]
- freshKind :: MonadState CheckState m => SourceSpan -> m SourceType
- bindLocalTypeVariables :: MonadState CheckState m => ModuleName -> [(ProperName 'TypeName, SourceType)] -> m a -> m a
- debugType :: Type a -> String
- lookupTypeVariable :: (e ~ MultipleErrors, MonadState CheckState m, MonadError e m) => ModuleName -> Qualified (ProperName 'TypeName) -> m SourceType
- withFreshSubstitution :: MonadState CheckState m => m a -> m a
- srcKindedType :: SourceType -> SourceType -> SourceType
- checkRoles :: forall m. MonadError MultipleErrors m => [(Text, Maybe SourceType, Role)] -> [Role] -> m ()
- checkRoleDeclarationArity :: forall m. MonadError MultipleErrors m => ProperName 'TypeName -> [Role] -> Int -> m ()
- inferRoles :: Environment -> ModuleName -> ProperName 'TypeName -> [(Text, Maybe SourceType)] -> [DataConstructorDeclaration] -> [Role]
- inferDataBindingGroupRoles :: Environment -> ModuleName -> [RoleDeclarationData] -> [DataDeclaration] -> ProperName 'TypeName -> [(Text, Maybe SourceType)] -> [Role]
- everythingWithContextOnValues :: forall s r. s -> r -> (r -> r -> r) -> (s -> Declaration -> (s, r)) -> (s -> Expr -> (s, r)) -> (s -> Binder -> (s, r)) -> (s -> CaseAlternative -> (s, r)) -> (s -> DoNotationElement -> (s, r)) -> (Declaration -> r, Expr -> r, Binder -> r, CaseAlternative -> r, DoNotationElement -> r)
- everywhereWithContextOnValuesM :: forall m s. Monad m => s -> (s -> Declaration -> m (s, Declaration)) -> (s -> Expr -> m (s, Expr)) -> (s -> Binder -> m (s, Binder)) -> (s -> CaseAlternative -> m (s, CaseAlternative)) -> (s -> DoNotationElement -> m (s, DoNotationElement)) -> (s -> Guard -> m (s, Guard)) -> (Declaration -> m Declaration, Expr -> m Expr, Binder -> m Binder, CaseAlternative -> m CaseAlternative, DoNotationElement -> m DoNotationElement, Guard -> m Guard)
- nonEmptySpan :: SourceAnn -> Maybe SourceSpan
- replaceTypeVars :: Text -> Type a -> Type a -> Type a
- getHints :: MonadState CheckState m => m [ErrorMessageHint]
- isREmpty :: forall a. Type a -> Bool
- replaceAllTypeSynonymsM :: MonadError MultipleErrors m => SynonymMap -> KindMap -> SourceType -> m SourceType
- typesOf :: (MonadSupply m, MonadState CheckState m, MonadError MultipleErrors m, MonadWriter MultipleErrors m) => BindingGroupType -> ModuleName -> [((SourceAnn, Ident), Expr)] -> m [((SourceAnn, Ident), (Expr, SourceType))]
- escalateWarningWhen :: (MonadWriter MultipleErrors m, MonadError MultipleErrors m) => (ErrorMessage -> Bool) -> m a -> m a
- onErrorMessages :: (ErrorMessage -> ErrorMessage) -> MultipleErrors -> MultipleErrors
- onTypesInErrorMessage :: (SourceType -> SourceType) -> ErrorMessage -> ErrorMessage
- withoutPosition :: ErrorMessage -> ErrorMessage
- getLocalContext :: MonadState CheckState m => m Context
- lookupUnkName :: MonadState CheckState m => Unknown -> m (Maybe Text)
- mkForAll :: [(a, (Text, Maybe (Type a)))] -> Type a -> Type a
- displaySourcePos :: SourcePos -> Text
- displaySourcePosShort :: SourcePos -> Text
- displayStartEndPosShort :: SourceSpan -> Text
- displaySourceSpan :: FilePath -> SourceSpan -> Text
- widenSourceSpan :: SourceSpan -> SourceSpan -> SourceSpan
- widenSourceAnn :: SourceAnn -> SourceAnn -> SourceAnn
- showAssoc :: Associativity -> String
- readAssoc :: String -> Associativity
- getValOpName :: Name -> Maybe (OpName 'ValueOpName)
- getTypeName :: Name -> Maybe (ProperName 'TypeName)
- getTypeOpName :: Name -> Maybe (OpName 'TypeOpName)
- getDctorName :: Name -> Maybe (ProperName 'ConstructorName)
- getClassName :: Name -> Maybe (ProperName 'ClassName)
- showOp :: OpName a -> Text
- coerceOpName :: OpName a -> OpName b
- codegenTargets :: Map String CodegenTarget
- srcTypeLevelInt :: Integer -> SourceType
- srcTypeWildcard :: SourceType
- srcKindApp :: SourceType -> SourceType -> SourceType
- srcForAll :: TypeVarVisibility -> Text -> Maybe SourceType -> SourceType -> Maybe SkolemScope -> SourceType
- srcConstrainedType :: SourceConstraint -> SourceType -> SourceType
- srcREmpty :: SourceType
- srcRCons :: Label -> SourceType -> SourceType -> SourceType
- toREmptyKinded :: forall a. Type a -> Maybe (a, Maybe (Type a))
- mapConstraintArgsAll :: ([Type a] -> [Type a]) -> Constraint a -> Constraint a
- overConstraintArgsAll :: Applicative f => ([Type a] -> f [Type a]) -> Constraint a -> f (Constraint a)
- constraintDataToJSON :: ConstraintData -> Value
- constraintToJSON :: (a -> Value) -> Constraint a -> Value
- typeToJSON :: forall a. (a -> Value) -> Type a -> Value
- typeVarVisToJSON :: TypeVarVisibility -> Value
- constraintDataFromJSON :: Value -> Parser ConstraintData
- constraintFromJSON :: forall a. Parser a -> (Value -> Parser a) -> Value -> Parser (Constraint a)
- typeFromJSON :: forall a. Parser a -> (Value -> Parser a) -> Value -> Parser (Type a)
- typeVarVisFromJSON :: Value -> Parser TypeVarVisibility
- srcRowListItem :: Label -> SourceType -> RowListItem SourceAnn
- addVisibility :: [(Text, TypeVarVisibility)] -> Type a -> Type a
- quantify :: Type a -> Type a
- moveQuantifiersToFront :: Type a -> Type a
- unknowns :: Type a -> IntSet
- unapplyConstraints :: Type a -> ([Constraint a], Type a)
- setAnnForType :: a -> Type a -> Type a
- annForType :: Lens' (Type a) a
- compareType :: Type a -> Type b -> Ordering
- eqMaybeType :: Maybe (Type a) -> Maybe (Type b) -> Bool
- eqConstraint :: Constraint a -> Constraint b -> Bool
- compareMaybeType :: Maybe (Type a) -> Maybe (Type b) -> Ordering
- compareConstraint :: Constraint a -> Constraint b -> Ordering
- allPrimTypes :: Map (Qualified (ProperName 'TypeName)) (SourceType, TypeKind)
- allPrimClasses :: Map (Qualified (ProperName 'ClassName)) TypeClassData
- computeCoveringSets :: Int -> [FunctionalDependency] -> (Set Int, Set (Set Int))
- showDataDeclType :: DataDeclType -> Text
- kindConstraint :: SourceType
- kindSymbol :: SourceType
- kindDoc :: SourceType
- kindOrdering :: SourceType
- kindRowList :: SourceType -> SourceType
- kindOfREmpty :: SourceType
- tyForall :: Text -> SourceType -> SourceType -> SourceType
- tyVar :: Text -> SourceType
- tyChar :: SourceType
- tyNumber :: SourceType
- tyArray :: SourceType
- primClass :: Qualified (ProperName 'ClassName) -> (SourceType -> SourceType) -> [(Qualified (ProperName 'TypeName), (SourceType, TypeKind))]
- primTypes :: Map (Qualified (ProperName 'TypeName)) (SourceType, TypeKind)
- primBooleanTypes :: Map (Qualified (ProperName 'TypeName)) (SourceType, TypeKind)
- primCoerceTypes :: Map (Qualified (ProperName 'TypeName)) (SourceType, TypeKind)
- primOrderingTypes :: Map (Qualified (ProperName 'TypeName)) (SourceType, TypeKind)
- primRowTypes :: Map (Qualified (ProperName 'TypeName)) (SourceType, TypeKind)
- primRowListTypes :: Map (Qualified (ProperName 'TypeName)) (SourceType, TypeKind)
- primSymbolTypes :: Map (Qualified (ProperName 'TypeName)) (SourceType, TypeKind)
- primIntTypes :: Map (Qualified (ProperName 'TypeName)) (SourceType, TypeKind)
- primTypeErrorTypes :: Map (Qualified (ProperName 'TypeName)) (SourceType, TypeKind)
- dictTypeName' :: Text -> Text
- binderNamesWithSpans :: Binder -> [(SourceSpan, Ident)]
- isIrrefutable :: Binder -> Bool
- onTypeSearchTypes :: (SourceType -> SourceType) -> TypeSearch -> TypeSearch
- onTypeSearchTypesM :: Applicative m => (SourceType -> m SourceType) -> TypeSearch -> m TypeSearch
- getModuleDeclarations :: Module -> [Declaration]
- addDefaultImport :: Qualified ModuleName -> Module -> Module
- declRefSourceSpan :: DeclarationRef -> SourceSpan
- getValueRef :: DeclarationRef -> Maybe Ident
- getTypeClassRef :: DeclarationRef -> Maybe (ProperName 'ClassName)
- isModuleRef :: DeclarationRef -> Bool
- getTypeDeclaration :: Declaration -> Maybe TypeDeclarationData
- unwrapTypeDeclaration :: TypeDeclarationData -> (Ident, SourceType)
- getValueDeclaration :: Declaration -> Maybe (ValueDeclarationData [GuardedExpr])
- mapDataCtorFields :: ([(Ident, SourceType)] -> [(Ident, SourceType)]) -> DataConstructorDeclaration -> DataConstructorDeclaration
- traverseDataCtorFields :: Monad m => ([(Ident, SourceType)] -> m [(Ident, SourceType)]) -> DataConstructorDeclaration -> m DataConstructorDeclaration
- declSourceAnn :: Declaration -> SourceAnn
- 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
- isAnonymousArgument :: Expr -> Bool
- mapGuardedExpr :: (Guard -> Guard) -> (Expr -> Expr) -> GuardedExpr -> GuardedExpr
- litM :: Monad m => (a -> m a) -> Literal a -> m (Literal a)
- inScope :: Ident -> Set ScopedIdent -> Bool
- everythingWithScope :: forall r. Monoid r => (Set ScopedIdent -> Declaration -> r) -> (Set ScopedIdent -> Expr -> r) -> (Set ScopedIdent -> Binder -> r) -> (Set ScopedIdent -> CaseAlternative -> r) -> (Set ScopedIdent -> DoNotationElement -> r) -> (Set ScopedIdent -> Declaration -> r, Set ScopedIdent -> Expr -> r, Set ScopedIdent -> Binder -> r, Set ScopedIdent -> CaseAlternative -> r, Set ScopedIdent -> DoNotationElement -> r)
- accumTypes :: Monoid r => (SourceType -> r) -> (Declaration -> r, Expr -> r, Binder -> r, CaseAlternative -> r, DoNotationElement -> r)
- overTypes :: (SourceType -> SourceType) -> Expr -> Expr
- errorSpan :: ErrorMessage -> Maybe (NonEmpty SourceSpan)
- findHint :: (ErrorMessageHint -> Maybe a) -> ErrorMessage -> Maybe a
- errorModule :: ErrorMessage -> Maybe ModuleName
- stripModuleAndSpan :: ErrorMessage -> ErrorMessage
- errorCode :: ErrorMessage -> Text
- unwrapErrorMessage :: ErrorMessage -> SimpleErrorMessage
- errorMessage''' :: [SourceSpan] -> SimpleErrorMessage -> MultipleErrors
- defaultUnknownMap :: TypeMap
- replaceUnknowns :: SourceType -> State TypeMap SourceType
- onTypesInErrorMessageM :: Applicative m => (SourceType -> m SourceType) -> ErrorMessage -> m ErrorMessage
- errorDocUri :: ErrorMessage -> Text
- errorSuggestion :: SimpleErrorMessage -> Maybe ErrorSuggestion
- prettyPrintSuggestedTypeSimplified :: Type a -> String
- prettyPrintKindSignatureFor :: KindSignatureFor -> Text
- prettyPrintRef :: DeclarationRef -> Maybe Text
- suggestionSpan :: ErrorMessage -> Maybe SourceSpan
- showSuggestion :: SimpleErrorMessage -> Text
- ansiColor :: (ColorIntensity, Color) -> String
- ansiColorReset :: String
- colorCode :: Maybe (ColorIntensity, Color) -> Text -> Text
- colorCodeBox :: Maybe (ColorIntensity, Color) -> Box -> Box
- commasAndConjunction :: Text -> [Text] -> Text
- defaultCodeColor :: (ColorIntensity, Color)
- prettyPrintSingleError :: PPEOptions -> ErrorMessage -> Box
- lineS :: String -> Box
- toTypelevelString :: Type a -> Maybe Box
- prettyPrintExport :: DeclarationRef -> Text
- prettyPrintImport :: ModuleName -> ImportDeclarationType -> Maybe ModuleName -> Text
- prettyPrintMultipleErrorsBox :: PPEOptions -> MultipleErrors -> [Box]
- prettyPrintMultipleWarnings :: PPEOptions -> MultipleErrors -> String
- prettyPrintMultipleWarningsBox :: PPEOptions -> MultipleErrors -> [Box]
- prettyPrintMultipleErrorsWith :: PPEOptions -> String -> String -> MultipleErrors -> [Box]
- insertUnkName :: MonadState CheckState m => Unknown -> Text -> m ()
- emptySubstitution :: Substitution
- bindNames :: MonadState CheckState m => Map (Qualified Ident) (SourceType, NameKind, NameVisibility) -> m a -> m a
- bindTypes :: MonadState CheckState m => Map (Qualified (ProperName 'TypeName)) (SourceType, TypeKind) -> m a -> m a
- withScopedTypeVars :: (MonadState CheckState m, MonadWriter MultipleErrors m) => ModuleName -> [(Text, SourceType)] -> m a -> m a
- rethrowWithPositionTC :: (MonadState CheckState m, MonadError MultipleErrors m) => SourceSpan -> m a -> m a
- warnAndRethrowWithPositionTC :: (MonadState CheckState m, MonadError MultipleErrors m, MonadWriter MultipleErrors m) => SourceSpan -> m a -> m a
- withTypeClassDictionaries :: MonadState CheckState m => [NamedDict] -> m a -> m a
- lookupTypeClassDictionaries :: MonadState CheckState m => QualifiedBy -> m (Map (Qualified (ProperName 'ClassName)) (Map (Qualified Ident) (NonEmpty NamedDict)))
- lookupTypeClassDictionariesForClass :: MonadState CheckState m => QualifiedBy -> Qualified (ProperName 'ClassName) -> m (Map (Qualified Ident) (NonEmpty NamedDict))
- bindLocalVariables :: MonadState CheckState m => [(SourceSpan, Ident, SourceType, NameVisibility)] -> m a -> m a
- makeBindingGroupVisible :: MonadState CheckState m => m ()
- modifyEnv :: MonadState CheckState m => (Environment -> Environment) -> m ()
- withBindingGroupVisible :: MonadState CheckState m => m a -> m a
- preservingNames :: MonadState CheckState m => m a -> m a
- lookupVariable :: (e ~ MultipleErrors, MonadState CheckState m, MonadError e m) => Qualified Ident -> m SourceType
- getVisibility :: (e ~ MultipleErrors, MonadState CheckState m, MonadError e m) => Qualified Ident -> m NameVisibility
- checkVisibility :: (e ~ MultipleErrors, MonadState CheckState m, MonadError e m) => Qualified Ident -> m ()
- putEnv :: MonadState CheckState m => Environment -> m ()
- runCheck :: Functor m => CheckState -> StateT CheckState m a -> m (a, Environment)
- capturingSubstitution :: MonadState CheckState m => (a -> Substitution -> b) -> m a -> m b
- withoutWarnings :: MonadWriter w m => m a -> m (a, w)
- debugEnv :: Environment -> [String]
- debugTypes :: Environment -> [String]
- debugTypeSynonyms :: Environment -> [String]
- debugTypeClasses :: Environment -> [String]
- debugTypeClassDictionaries :: Environment -> [String]
- debugDataConstructors :: Environment -> [String]
- debugNames :: Environment -> [String]
- debugConstraint :: Constraint a -> String
- debugValue :: Expr -> String
- debugSubstitution :: Substitution -> [String]
- version :: Version

# Documentation

data Literal a #

Data type for literal values. Parameterised so it can be used for Exprs and Binders.

Constructors

NumericLiteral (Either Integer Double) | A numeric literal
StringLiteral PSString | A string literal
CharLiteral Char | A character literal
BooleanLiteral Bool | A boolean literal
ArrayLiteral [a] | An array literal
ObjectLiteral [(PSString, a)] | An object literal

#### Instances

Instances details

Functor Literal # |
Instance details Defined in Language.PureScript.AST.Literals Methods fmap :: (a -> b) -> Literal a -> Literal b # (<$) :: a -> Literal b -> Literal a #
Show a => Show (Literal a) # |
Instance details Defined in Language.PureScript.AST.Literals Methods showsPrec :: Int -> Literal a -> ShowS # show :: Literal a -> String # showList :: [Literal a] -> ShowS #
Eq a => Eq (Literal a) # |
Instance details Defined in Language.PureScript.AST.Literals Methods (==) :: Literal a -> Literal a -> Bool # (/=) :: Literal a -> Literal a -> Bool #
Ord a => Ord (Literal a) # |
Instance details Defined in Language.PureScript.AST.Literals Methods compare :: Literal a -> Literal a -> Ordering # (<) :: Literal a -> Literal a -> Bool # (<=) :: Literal a -> Literal a -> Bool # (>) :: Literal a -> Literal a -> Bool # (>=) :: Literal a -> Literal a -> Bool # max :: Literal a -> Literal a -> Literal a # min :: Literal a -> Literal a -> Literal a #

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 #

data Type a #

The type of types

Constructors

TUnknown a Int | A unification variable of type Type
TypeVar a Text | A named type variable
TypeLevelString a PSString | A type-level string
TypeLevelInt a Integer | A type-level natural
TypeWildcard a WildcardData | A type wildcard, as would appear in a partial type synonym
TypeConstructor a (Qualified (ProperName 'TypeName)) | A type constructor
TypeOp a (Qualified (OpName 'TypeOpName)) | A type operator. This will be desugared into a type constructor during the "operators" phase of desugaring.
TypeApp a (Type a) (Type a) | A type application
KindApp a (Type a) (Type a) | Explicit kind application
ForAll a TypeVarVisibility Text (Maybe (Type a)) (Type a) (Maybe SkolemScope) | Forall quantifier
ConstrainedType a (Constraint a) (Type a) | A type with a set of type class constraints
Skolem a Text (Maybe (Type a)) Int SkolemScope | A skolem constant
REmpty a | An empty row
RCons a Label (Type a) (Type a) | A non-empty row
KindedType a (Type a) (Type a) | A type with a kind annotation
BinaryNoParensType a (Type a) (Type a) (Type a) | Binary operator application. During the rebracketing phase of desugaring, this data constructor will be removed.
ParensInType a (Type a) | 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.

#### Instances

Instances details

Foldable Type # |
Instance details Defined in Language.PureScript.Types Methods fold :: Monoid m => Type m -> m # foldMap :: Monoid m => (a -> m) -> Type a -> m # foldMap' :: Monoid m => (a -> m) -> Type a -> m foldr :: (a -> b -> b) -> b -> Type a -> b # foldr' :: (a -> b -> b) -> b -> Type a -> b # foldl :: (b -> a -> b) -> b -> Type a -> b # foldl' :: (b -> a -> b) -> b -> Type a -> b # foldr1 :: (a -> a -> a) -> Type a -> a # foldl1 :: (a -> a -> a) -> Type a -> a # toList :: Type a -> [a] # null :: Type a -> Bool # length :: Type a -> Int # elem :: Eq a => a -> Type a -> Bool # maximum :: Ord a => Type a -> a # minimum :: Ord a => Type a -> a # sum :: Num a => Type a -> a # product :: Num a => Type a -> a #
Traversable Type # |
Instance details Defined in Language.PureScript.Types Methods traverse :: Applicative f => (a -> f b) -> Type a -> f (Type b) # sequenceA :: Applicative f => Type (f a) -> f (Type a) mapM :: Monad m => (a -> m b) -> Type a -> m (Type b) sequence :: Monad m => Type (m a) -> m (Type a)
Functor Type # |
Instance details Defined in Language.PureScript.Types Methods fmap :: (a -> b) -> Type a -> Type b # (<$) :: a -> Type b -> Type a #
FromJSON (Type SourceAnn) # |
Instance details Defined in Language.PureScript.Types Methods parseJSON :: Value -> Parser (Type SourceAnn) # parseJSONList :: Value -> Parser [Type SourceAnn] # omittedField :: Maybe (Type SourceAnn) #
FromJSON (Type ()) # |
Instance details Defined in Language.PureScript.Types Methods parseJSON :: Value -> Parser (Type ()) # parseJSONList :: Value -> Parser [Type ()] # omittedField :: Maybe (Type ()) #
FromJSON a => FromJSON (Type a) # |
Instance details Defined in Language.PureScript.Types Methods parseJSON :: Value -> Parser (Type a) # parseJSONList :: Value -> Parser [Type a] # omittedField :: Maybe (Type a) #
ToJSON a => ToJSON (Type a) # |
Instance details Defined in Language.PureScript.Types Methods toJSON :: Type a -> Value # toEncoding :: Type a -> Encoding # toJSONList :: [Type a] -> Value # toEncodingList :: [Type a] -> Encoding # omitField :: Type a -> Bool #
Generic (Type a) # |
Instance details Defined in Language.PureScript.Types Associated Types type Rep (Type a) :: Type -> Type # Methods from :: Type a -> Rep (Type a) x # to :: Rep (Type a) x -> Type a #
Show a => Show (Type a) # |
Instance details Defined in Language.PureScript.Types Methods showsPrec :: Int -> Type a -> ShowS # show :: Type a -> String # showList :: [Type a] -> ShowS #
NFData a => NFData (Type a) # |
Instance details Defined in Language.PureScript.Types Methods rnf :: Type a -> () #
Eq (Type a) # |
Instance details Defined in Language.PureScript.Types Methods (==) :: Type a -> Type a -> Bool # (/=) :: Type a -> Type a -> Bool #
Ord (Type a) # |
Instance details Defined in Language.PureScript.Types Methods compare :: Type a -> Type a -> Ordering # (<) :: Type a -> Type a -> Bool # (<=) :: Type a -> Type a -> Bool # (>) :: Type a -> Type a -> Bool # (>=) :: Type a -> Type a -> Bool # max :: Type a -> Type a -> Type a # min :: Type a -> Type a -> Type a #
Serialise a => Serialise (Type a) # |
Instance details Defined in Language.PureScript.Types Methods encode :: Type a -> Encoding # decode :: Decoder s (Type a) # encodeList :: [Type a] -> Encoding # decodeList :: Decoder s [Type a] #
type Rep (Type a) # |
Instance details Defined in Language.PureScript.Types type Rep (Type a) = D1 ('MetaData "Type" "Language.PureScript.Types" "purescript-0.15.12-5l1zT9m1jq0GgrLEUvYibC" 'False) ((((C1 ('MetaCons "TUnknown" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :+: C1 ('MetaCons "TypeVar" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) :+: (C1 ('MetaCons "TypeLevelString" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PSString)) :+: C1 ('MetaCons "TypeLevelInt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer)))) :+: ((C1 ('MetaCons "TypeWildcard" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 WildcardData)) :+: C1 ('MetaCons "TypeConstructor" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Qualified (ProperName 'TypeName))))) :+: (C1 ('MetaCons "TypeOp" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Qualified (OpName 'TypeOpName)))) :+: C1 ('MetaCons "TypeApp" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type a))))))) :+: (((C1 ('MetaCons "KindApp" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type a)))) :+: C1 ('MetaCons "ForAll" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TypeVarVisibility) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Type a))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe SkolemScope)))))) :+: (C1 ('MetaCons "ConstrainedType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Constraint a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type a)))) :+: C1 ('MetaCons "Skolem" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Type a))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SkolemScope)))))) :+: ((C1 ('MetaCons "REmpty" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "RCons" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Label)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type a))))) :+: (C1 ('MetaCons "KindedType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type a)))) :+: (C1 ('MetaCons "BinaryNoParensType" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type a))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type a)))) :+: C1 ('MetaCons "ParensInType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type a))))))))

data Constraint a #

A typeclass constraint

Constructors

Constraint |
Fields constraintAnn :: a constraint annotation constraintClass :: Qualified (ProperName 'ClassName) constraint class name constraintKindArgs :: [Type a] kind arguments constraintArgs :: [Type a] type arguments constraintData :: Maybe ConstraintData additional data relevant to this constraint

#### Instances

Instances details

Foldable Constraint # |
Instance details Defined in Language.PureScript.Types Methods fold :: Monoid m => Constraint m -> m # foldMap :: Monoid m => (a -> m) -> Constraint a -> m # foldMap' :: Monoid m => (a -> m) -> Constraint a -> m foldr :: (a -> b -> b) -> b -> Constraint a -> b # foldr' :: (a -> b -> b) -> b -> Constraint a -> b # foldl :: (b -> a -> b) -> b -> Constraint a -> b # foldl' :: (b -> a -> b) -> b -> Constraint a -> b # foldr1 :: (a -> a -> a) -> Constraint a -> a # foldl1 :: (a -> a -> a) -> Constraint a -> a # toList :: Constraint a -> [a] # null :: Constraint a -> Bool # length :: Constraint a -> Int # elem :: Eq a => a -> Constraint a -> Bool # maximum :: Ord a => Constraint a -> a # minimum :: Ord a => Constraint a -> a # sum :: Num a => Constraint a -> a # product :: Num a => Constraint a -> a #
Traversable Constraint # |
Instance details Defined in Language.PureScript.Types Methods traverse :: Applicative f => (a -> f b) -> Constraint a -> f (Constraint b) # sequenceA :: Applicative f => Constraint (f a) -> f (Constraint a) mapM :: Monad m => (a -> m b) -> Constraint a -> m (Constraint b) sequence :: Monad m => Constraint (m a) -> m (Constraint a)
Functor Constraint # |
Instance details Defined in Language.PureScript.Types Methods fmap :: (a -> b) -> Constraint a -> Constraint b # (<$) :: a -> Constraint b -> Constraint a #
FromJSON (Constraint SourceAnn) # |
Instance details Defined in Language.PureScript.Types Methods parseJSON :: Value -> Parser (Constraint SourceAnn) # parseJSONList :: Value -> Parser [Constraint SourceAnn] # omittedField :: Maybe (Constraint SourceAnn) #
FromJSON (Constraint ()) # |
Instance details Defined in Language.PureScript.Types Methods parseJSON :: Value -> Parser (Constraint ()) # parseJSONList :: Value -> Parser [Constraint ()] # omittedField :: Maybe (Constraint ()) #
FromJSON a => FromJSON (Constraint a) # |
Instance details Defined in Language.PureScript.Types Methods parseJSON :: Value -> Parser (Constraint a) # parseJSONList :: Value -> Parser [Constraint a] # omittedField :: Maybe (Constraint a) #
ToJSON a => ToJSON (Constraint a) # |
Instance details Defined in Language.PureScript.Types Methods toJSON :: Constraint a -> Value # toEncoding :: Constraint a -> Encoding # toJSONList :: [Constraint a] -> Value # toEncodingList :: [Constraint a] -> Encoding # omitField :: Constraint a -> Bool #
Generic (Constraint a) # |
Instance details Defined in Language.PureScript.Types Associated Types type Rep (Constraint a) :: Type -> Type # Methods from :: Constraint a -> Rep (Constraint a) x # to :: Rep (Constraint a) x -> Constraint a #
Show a => Show (Constraint a) # |
Instance details Defined in Language.PureScript.Types Methods showsPrec :: Int -> Constraint a -> ShowS # show :: Constraint a -> String # showList :: [Constraint a] -> ShowS #
NFData a => NFData (Constraint a) # |
Instance details Defined in Language.PureScript.Types Methods rnf :: Constraint a -> () #
Eq (Constraint a) # |
Instance details Defined in Language.PureScript.Types Methods (==) :: Constraint a -> Constraint a -> Bool # (/=) :: Constraint a -> Constraint a -> Bool #
Ord (Constraint a) # |
Instance details Defined in Language.PureScript.Types Methods compare :: Constraint a -> Constraint a -> Ordering # (<) :: Constraint a -> Constraint a -> Bool # (<=) :: Constraint a -> Constraint a -> Bool # (>) :: Constraint a -> Constraint a -> Bool # (>=) :: Constraint a -> Constraint a -> Bool # max :: Constraint a -> Constraint a -> Constraint a # min :: Constraint a -> Constraint a -> Constraint a #
Serialise a => Serialise (Constraint a) # |
Instance details Defined in Language.PureScript.Types Methods encode :: Constraint a -> Encoding # decode :: Decoder s (Constraint a) # encodeList :: [Constraint a] -> Encoding # decodeList :: Decoder s [Constraint a] #
type Rep (Constraint a) # |
Instance details Defined in Language.PureScript.Types type Rep (Constraint a) = D1 ('MetaData "Constraint" "Language.PureScript.Types" "purescript-0.15.12-5l1zT9m1jq0GgrLEUvYibC" 'False) (C1 ('MetaCons "Constraint" 'PrefixI 'True) ((S1 ('MetaSel ('Just "constraintAnn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Just "constraintClass") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Qualified (ProperName 'ClassName)))) :*: (S1 ('MetaSel ('Just "constraintKindArgs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Type a]) :*: (S1 ('MetaSel ('Just "constraintArgs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Type a]) :*: S1 ('MetaSel ('Just "constraintData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ConstraintData))))))

data Options #

The data type of compiler options

Constructors

Options |
Fields optionsVerboseErrors :: Bool Verbose error message optionsNoComments :: Bool Remove the comments from the generated js optionsCodegenTargets :: Set CodegenTarget Codegen targets (JS, CoreFn, etc.)

#### Instances

Instances details

Show Options # |
Instance details Defined in Language.PureScript.Options Methods showsPrec :: Int -> Options -> ShowS # show :: Options -> String # showList :: [Options] -> ShowS #
MonadReader Options Make # |
Instance details Defined in Language.PureScript.Make.Monad Methods ask :: Make Options # local :: (Options -> Options) -> Make a -> Make a # reader :: (Options -> a) -> Make a #

data Text #

#### Instances

Instances details

Structured Text |
Instance details Defined in Distribution.Utils.Structured Methods structure :: Proxy Text -> Structure structureHash' :: Tagged Text MD5
FromJSON Text |
Instance details Defined in Data.Aeson.Types.FromJSON Methods parseJSON :: Value -> Parser Text # parseJSONList :: Value -> Parser [Text] # omittedField :: Maybe Text #
FromJSONKey Text |
Instance details Defined in Data.Aeson.Types.FromJSON Methods fromJSONKey :: FromJSONKeyFunction Text # fromJSONKeyList :: FromJSONKeyFunction [Text] #
ToJSON Text |
Instance details Defined in Data.Aeson.Types.ToJSON Methods toJSON :: Text -> Value # toEncoding :: Text -> Encoding # toJSONList :: [Text] -> Value # toEncodingList :: [Text] -> Encoding # omitField :: Text -> Bool #
ToJSONKey Text |
Instance details Defined in Data.Aeson.Types.ToJSON Methods toJSONKey :: ToJSONKeyFunction Text # toJSONKeyList :: ToJSONKeyFunction [Text] #
Chunk Text |
Instance details Defined in Data.Attoparsec.Internal.Types Associated Types type ChunkElem Text # Methods nullChunk :: Text -> Bool # pappendChunk :: State Text -> Text -> State Text # atBufferEnd :: Text -> State Text -> Pos # bufferElemAt :: Text -> Pos -> State Text -> Maybe (ChunkElem Text, Int) # chunkElemToChar :: Text -> ChunkElem Text -> Char #
ToMarkup Text |
Instance details Defined in Text.Blaze Methods toMarkup :: Text -> Markup # preEscapedToMarkup :: Text -> Markup #
ToValue Text |
Instance details Defined in Text.Blaze Methods toValue :: Text -> AttributeValue # preEscapedToValue :: Text -> AttributeValue #
ToLogStr Text |
Instance details Defined in System.Log.FastLogger.LogStr Methods toLogStr :: Text -> LogStr #
Hashable Text |
Instance details Defined in Data.Hashable.Class Methods hashWithSalt :: Int -> Text -> Int # hash :: Text -> Int #
Ixed Text |
Instance details Defined in Control.Lens.At Methods ix :: Index Text -> Traversal' Text (IxValue Text) #
Print Text |
Instance details Defined in Protolude.Show Methods hPutStr :: MonadIO m => Handle -> Text -> m () # putStr :: MonadIO m => Text -> m () # hPutStrLn :: MonadIO m => Handle -> Text -> m () # putStrLn :: MonadIO m => Text -> m () # putErrLn :: MonadIO m => Text -> m () #
Extract Text | Since: regex-base-0.94.0.0
Instance details Defined in Text.Regex.Base.RegexLike Methods before :: Int -> Text -> Text # after :: Int -> Text -> Text # empty :: Text # extract :: (Int, Int) -> Text -> Text #
Serialise Text | Since: serialise-0.2.0.0
Instance details Defined in Codec.Serialise.Class Methods encode :: Text -> Encoding # decode :: Decoder s Text # encodeList :: [Text] -> Encoding # decodeList :: Decoder s [Text] #
StringConv ByteString Text |
Instance details Defined in Protolude.Conv Methods strConv :: Leniency -> ByteString -> Text #
StringConv ByteString Text |
Instance details Defined in Protolude.Conv Methods strConv :: Leniency -> ByteString -> Text #
StringConv Text ByteString |
Instance details Defined in Protolude.Conv Methods strConv :: Leniency -> Text -> ByteString #
StringConv Text ByteString |
Instance details Defined in Protolude.Conv Methods strConv :: Leniency -> Text -> ByteString #
StringConv Text Text |
Instance details Defined in Protolude.Conv Methods strConv :: Leniency -> Text -> Text #
StringConv Text Text |
Instance details Defined in Protolude.Conv Methods strConv :: Leniency -> Text0 -> Text #
StringConv Text String |
Instance details Defined in Protolude.Conv Methods strConv :: Leniency -> Text -> String #
StringConv Text Text |
Instance details Defined in Protolude.Conv Methods strConv :: Leniency -> Text -> Text0 #
StringConv String Text |
Instance details Defined in Protolude.Conv Methods strConv :: Leniency -> String -> Text #
ConvertText Text Text |
Instance details Defined in Protolude.ConvertText Methods toS :: Text -> Text #
ConvertText Text Text |
Instance details Defined in Protolude.ConvertText Methods toS :: Text0 -> Text #
ConvertText Text String |
Instance details Defined in Protolude.ConvertText Methods toS :: Text -> String #
ConvertText Text Text |
Instance details Defined in Protolude.ConvertText Methods toS :: Text -> Text0 #
ConvertText String Text |
Instance details Defined in Protolude.ConvertText Methods toS :: String -> Text #
Monad m => Stream Text m Char |
Instance details Defined in Text.Parsec.Prim Methods uncons :: Text -> m (Maybe (Char, Text))
Cons Text Text Char Char |
Instance details Defined in Control.Lens.Cons Methods _Cons :: Prism Text Text (Char, Text) (Char, Text) #
Snoc Text Text Char Char |
Instance details Defined in Control.Lens.Cons Methods _Snoc :: Prism Text Text (Text, Char) (Text, Char) #
type ChunkElem Text |
Instance details Defined in Data.Attoparsec.Internal.Types type ChunkElem Text = Char
type State Text |
Instance details Defined in Data.Attoparsec.Internal.Types type State Text = Buffer
type Item Text |
Instance details Defined in Data.Text type Item Text = Char
type Index Text |
Instance details Defined in Control.Lens.At type Index Text = Int
type IxValue Text |
Instance details Defined in Control.Lens.At type IxValue Text = Char

data Name #

A sum of the possible name types, useful for error and lint messages.

Constructors

IdentName Ident |
ValOpName (OpName 'ValueOpName) |
TyName (ProperName 'TypeName) |
TyOpName (OpName 'TypeOpName) |
DctorName (ProperName 'ConstructorName) |
TyClassName (ProperName 'ClassName) |
ModName ModuleName |

#### Instances

Instances details

Generic Name # |
Instance details Defined in Language.PureScript.Names Associated Types type Rep Name :: Type -> Type # Methods from :: Name -> Rep Name x # to :: Rep Name x -> Name #
Show Name # |
Instance details Defined in Language.PureScript.Names Methods showsPrec :: Int -> Name -> ShowS # show :: Name -> String # showList :: [Name] -> ShowS #
NFData Name # |
Instance details Defined in Language.PureScript.Names Methods rnf :: Name -> () #
Eq Name # |
Instance details Defined in Language.PureScript.Names Methods (==) :: Name -> Name -> Bool # (/=) :: Name -> Name -> Bool #
Ord Name # |
Instance details Defined in Language.PureScript.Names Methods compare :: Name -> Name -> Ordering # (<) :: Name -> Name -> Bool # (<=) :: Name -> Name -> Bool # (>) :: Name -> Name -> Bool # (>=) :: Name -> Name -> Bool # max :: Name -> Name -> Name # min :: Name -> Name -> Name #
Serialise Name # |
Instance details Defined in Language.PureScript.Names Methods encode :: Name -> Encoding # decode :: Decoder s Name # encodeList :: [Name] -> Encoding # decodeList :: Decoder s [Name] #
type Rep Name # |
Instance details Defined in Language.PureScript.Names type Rep Name = D1 ('MetaData "Name" "Language.PureScript.Names" "purescript-0.15.12-5l1zT9m1jq0GgrLEUvYibC" 'False) ((C1 ('MetaCons "IdentName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ident)) :+: (C1 ('MetaCons "ValOpName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OpName 'ValueOpName))) :+: C1 ('MetaCons "TyName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ProperName 'TypeName))))) :+: ((C1 ('MetaCons "TyOpName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OpName 'TypeOpName))) :+: C1 ('MetaCons "DctorName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ProperName 'ConstructorName)))) :+: (C1 ('MetaCons "TyClassName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ProperName 'ClassName))) :+: C1 ('MetaCons "ModName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ModuleName)))))

data Ident #

Names for value identifiers

Constructors

Ident Text | An alphanumeric identifier
GenIdent (Maybe Text) Integer | A generated name for an identifier
UnusedIdent | A generated name used only for type-checking
InternalIdent !InternalIdentData | A generated name used only for internal transformations

#### Instances

Instances details

FromJSON Ident # |
Instance details Defined in Language.PureScript.Names Methods parseJSON :: Value -> Parser Ident # parseJSONList :: Value -> Parser [Ident] # omittedField :: Maybe Ident #
ToJSON Ident # |
Instance details Defined in Language.PureScript.Names Methods toJSON :: Ident -> Value # toEncoding :: Ident -> Encoding # toJSONList :: [Ident] -> Value # toEncodingList :: [Ident] -> Encoding # omitField :: Ident -> Bool #
Generic Ident # |
Instance details Defined in Language.PureScript.Names Associated Types type Rep Ident :: Type -> Type # Methods from :: Ident -> Rep Ident x # to :: Rep Ident x -> Ident #
Show Ident # |
Instance details Defined in Language.PureScript.Names Methods showsPrec :: Int -> Ident -> ShowS # show :: Ident -> String # showList :: [Ident] -> ShowS #
NFData Ident # |
Instance details Defined in Language.PureScript.Names Methods rnf :: Ident -> () #
Eq Ident # |
Instance details Defined in Language.PureScript.Names Methods (==) :: Ident -> Ident -> Bool # (/=) :: Ident -> Ident -> Bool #
Ord Ident # |
Instance details Defined in Language.PureScript.Names Methods compare :: Ident -> Ident -> Ordering # (<) :: Ident -> Ident -> Bool # (<=) :: Ident -> Ident -> Bool # (>) :: Ident -> Ident -> Bool # (>=) :: Ident -> Ident -> Bool # max :: Ident -> Ident -> Ident # min :: Ident -> Ident -> Ident #
Serialise Ident # |
Instance details Defined in Language.PureScript.Names Methods encode :: Ident -> Encoding # decode :: Decoder s Ident # encodeList :: [Ident] -> Encoding # decodeList :: Decoder s [Ident] #
type Rep Ident # |
Instance details Defined in Language.PureScript.Names type Rep Ident = D1 ('MetaData "Ident" "Language.PureScript.Names" "purescript-0.15.12-5l1zT9m1jq0GgrLEUvYibC" 'False) ((C1 ('MetaCons "Ident" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: C1 ('MetaCons "GenIdent" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer))) :+: (C1 ('MetaCons "UnusedIdent" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "InternalIdent" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 InternalIdentData))))

type HasCallStack = ?callStack :: CallStack #

data ErrorMessage #

Constructors

ErrorMessage [ErrorMessageHint] SimpleErrorMessage |

#### Instances

Instances details

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

data Comment #

Constructors

LineComment Text |
BlockComment Text |

#### Instances

Instances details

FromJSON Comment # |
Instance details Defined in Language.PureScript.Comments Methods parseJSON :: Value -> Parser Comment # parseJSONList :: Value -> Parser [Comment] # omittedField :: Maybe Comment #
ToJSON Comment # |
Instance details Defined in Language.PureScript.Comments Methods toJSON :: Comment -> Value # toEncoding :: Comment -> Encoding # toJSONList :: [Comment] -> Value # toEncodingList :: [Comment] -> Encoding # omitField :: Comment -> Bool #
Generic Comment # |
Instance details Defined in Language.PureScript.Comments Associated Types type Rep Comment :: Type -> Type # Methods from :: Comment -> Rep Comment x # to :: Rep Comment x -> Comment #
Show Comment # |
Instance details Defined in Language.PureScript.Comments Methods showsPrec :: Int -> Comment -> ShowS # show :: Comment -> String # showList :: [Comment] -> ShowS #
NFData Comment # |
Instance details Defined in Language.PureScript.Comments Methods rnf :: Comment -> () #
Eq Comment # |
Instance details Defined in Language.PureScript.Comments Methods (==) :: Comment -> Comment -> Bool # (/=) :: Comment -> Comment -> Bool #
Ord Comment # |
Instance details Defined in Language.PureScript.Comments Methods compare :: Comment -> Comment -> Ordering # (<) :: Comment -> Comment -> Bool # (<=) :: Comment -> Comment -> Bool # (>) :: Comment -> Comment -> Bool # (>=) :: Comment -> Comment -> Bool # max :: Comment -> Comment -> Comment # min :: Comment -> Comment -> Comment #
Serialise Comment # |
Instance details Defined in Language.PureScript.Comments Methods encode :: Comment -> Encoding # decode :: Decoder s Comment # encodeList :: [Comment] -> Encoding # decodeList :: Decoder s [Comment] #
FromJSON (Constraint SourceAnn) # |
Instance details Defined in Language.PureScript.Types Methods parseJSON :: Value -> Parser (Constraint SourceAnn) # parseJSONList :: Value -> Parser [Constraint SourceAnn] # omittedField :: Maybe (Constraint SourceAnn) #
FromJSON (Type SourceAnn) # |
Instance details Defined in Language.PureScript.Types Methods parseJSON :: Value -> Parser (Type SourceAnn) # parseJSONList :: Value -> Parser [Type SourceAnn] # omittedField :: Maybe (Type SourceAnn) #
type Rep Comment # |
Instance details Defined in Language.PureScript.Comments type Rep Comment = D1 ('MetaData "Comment" "Language.PureScript.Comments" "purescript-0.15.12-5l1zT9m1jq0GgrLEUvYibC" 'False) (C1 ('MetaCons "LineComment" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: C1 ('MetaCons "BlockComment" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

type Env = Map ModuleName (SourceSpan, Imports, Exports) #

The imports and exports for a collection of modules. The `SourceSpan` is used to store the source location of the module with a given name, used to provide useful information when there is a duplicate module definition.

type Context = [(Ident, SourceType)] #

A map of locally-bound names in scope.

data Level #

How critical the issue is

Constructors

Error |
Warning |

#### Instances

Instances details

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

data Role #

The role of a type constructor's parameter.

Constructors

Nominal | This parameter's identity affects the representation of the type it is parameterising.
Representational | This parameter's representation affects the representation of the type it is parameterising.
Phantom | This parameter has no effect on the representation of the type it is parameterising.

#### Instances

Instances details

FromJSON Role # |
Instance details Defined in Language.PureScript.Roles Methods parseJSON :: Value -> Parser Role # parseJSONList :: Value -> Parser [Role] # omittedField :: Maybe Role #
ToJSON Role # |
Instance details Defined in Language.PureScript.Roles Methods toJSON :: Role -> Value # toEncoding :: Role -> Encoding # toJSONList :: [Role] -> Value # toEncodingList :: [Role] -> Encoding # omitField :: Role -> Bool #
Generic Role # |
Instance details Defined in Language.PureScript.Roles Associated Types type Rep Role :: Type -> Type # Methods from :: Role -> Rep Role x # to :: Rep Role x -> Role #
Show Role # |
Instance details Defined in Language.PureScript.Roles Methods showsPrec :: Int -> Role -> ShowS # show :: Role -> String # showList :: [Role] -> ShowS #
NFData Role # |
Instance details Defined in Language.PureScript.Roles Methods rnf :: Role -> () #
Eq Role # |
Instance details Defined in Language.PureScript.Roles Methods (==) :: Role -> Role -> Bool # (/=) :: Role -> Role -> Bool #
Ord Role # |
Instance details Defined in Language.PureScript.Roles Methods compare :: Role -> Role -> Ordering # (<) :: Role -> Role -> Bool # (<=) :: Role -> Role -> Bool # (>) :: Role -> Role -> Bool # (>=) :: Role -> Role -> Bool # max :: Role -> Role -> Role # min :: Role -> Role -> Role #
Serialise Role # |
Instance details Defined in Language.PureScript.Roles Methods encode :: Role -> Encoding # decode :: Decoder s Role # encodeList :: [Role] -> Encoding # decodeList :: Decoder s [Role] #
type Rep Role # |
Instance details Defined in Language.PureScript.Roles type Rep Role = D1 ('MetaData "Role" "Language.PureScript.Roles" "purescript-0.15.12-5l1zT9m1jq0GgrLEUvYibC" 'False) (C1 ('MetaCons "Nominal" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Representational" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Phantom" 'PrefixI 'False) (U1 :: Type -> Type)))

data Environment #

The `Environment` defines all values and types which are currently in scope:

Constructors

Environment |
Fields names :: Map (Qualified Ident) (SourceType, NameKind, NameVisibility) Values currently in scope types :: Map (Qualified (ProperName 'TypeName)) (SourceType, TypeKind) Type names currently in scope dataConstructors :: Map (Qualified (ProperName 'ConstructorName)) (DataDeclType, ProperName 'TypeName, SourceType, [Ident]) Data constructors currently in scope, along with their associated type constructor name, argument types and return type. typeSynonyms :: Map (Qualified (ProperName 'TypeName)) ([(Text, Maybe SourceType)], SourceType) Type synonyms currently in scope typeClassDictionaries :: Map QualifiedBy (Map (Qualified (ProperName 'ClassName)) (Map (Qualified Ident) (NonEmpty NamedDict))) Available type class dictionaries. When looking up `Nothing` in the outer map, this returns the map of type class dictionaries in local scope (ie dictionaries brought in by a constrained type). typeClasses :: Map (Qualified (ProperName 'ClassName)) TypeClassData Type classes

#### Instances

Instances details

Generic Environment # |
Instance details Defined in Language.PureScript.Environment Associated Types type Rep Environment :: Type -> Type # Methods from :: Environment -> Rep Environment x # to :: Rep Environment x -> Environment #
Show Environment # |
Instance details Defined in Language.PureScript.Environment Methods showsPrec :: Int -> Environment -> ShowS # show :: Environment -> String # showList :: [Environment] -> ShowS #
NFData Environment # |
Instance details Defined in Language.PureScript.Environment Methods rnf :: Environment -> () #
type Rep Environment # |
Instance details Defined in Language.PureScript.Environment type Rep Environment = D1 ('MetaData "Environment" "Language.PureScript.Environment" "purescript-0.15.12-5l1zT9m1jq0GgrLEUvYibC" 'False) (C1 ('MetaCons "Environment" 'PrefixI 'True) ((S1 ('MetaSel ('Just "names") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map (Qualified Ident) (SourceType, NameKind, NameVisibility))) :*: (S1 ('MetaSel ('Just "types") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map (Qualified (ProperName 'TypeName)) (SourceType, TypeKind))) :*: S1 ('MetaSel ('Just "dataConstructors") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map (Qualified (ProperName 'ConstructorName)) (DataDeclType, ProperName 'TypeName, SourceType, [Ident]))))) :*: (S1 ('MetaSel ('Just "typeSynonyms") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map (Qualified (ProperName 'TypeName)) ([(Text, Maybe SourceType)], SourceType))) :*: (S1 ('MetaSel ('Just "typeClassDictionaries") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map QualifiedBy (Map (Qualified (ProperName 'ClassName)) (Map (Qualified Ident) (NonEmpty NamedDict))))) :*: S1 ('MetaSel ('Just "typeClasses") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map (Qualified (ProperName 'ClassName)) TypeClassData))))))

data Associativity #

Associativity for infix operators

Constructors

Infixl |
Infixr |
Infix |

#### Instances

Instances details

FromJSON Associativity # |
Instance details Defined in Language.PureScript.AST.Operators Methods parseJSON :: Value -> Parser Associativity # parseJSONList :: Value -> Parser [Associativity] # omittedField :: Maybe Associativity #
ToJSON Associativity # |
Instance details Defined in Language.PureScript.AST.Operators Methods toJSON :: Associativity -> Value # toEncoding :: Associativity -> Encoding # toJSONList :: [Associativity] -> Value # toEncodingList :: [Associativity] -> Encoding # omitField :: Associativity -> Bool #
Generic Associativity # |
Instance details Defined in Language.PureScript.AST.Operators Associated Types type Rep Associativity :: Type -> Type # Methods from :: Associativity -> Rep Associativity x # to :: Rep Associativity x -> Associativity #
Show Associativity # |
Instance details Defined in Language.PureScript.AST.Operators Methods showsPrec :: Int -> Associativity -> ShowS # show :: Associativity -> String # showList :: [Associativity] -> ShowS #
NFData Associativity # |
Instance details Defined in Language.PureScript.AST.Operators Methods rnf :: Associativity -> () #
Eq Associativity # |
Instance details Defined in Language.PureScript.AST.Operators Methods (==) :: Associativity -> Associativity -> Bool # (/=) :: Associativity -> Associativity -> Bool #
Ord Associativity # |
Instance details Defined in Language.PureScript.AST.Operators Methods compare :: Associativity -> Associativity -> Ordering # (<) :: Associativity -> Associativity -> Bool # (<=) :: Associativity -> Associativity -> Bool # (>) :: Associativity -> Associativity -> Bool # (>=) :: Associativity -> Associativity -> Bool # max :: Associativity -> Associativity -> Associativity # min :: Associativity -> Associativity -> Associativity #
Serialise Associativity # |
Instance details Defined in Language.PureScript.AST.Operators Methods encode :: Associativity -> Encoding # decode :: Decoder s Associativity # encodeList :: [Associativity] -> Encoding # decodeList :: Decoder s [Associativity] #
type Rep Associativity # |
Instance details Defined in Language.PureScript.AST.Operators type Rep Associativity = D1 ('MetaData "Associativity" "Language.PureScript.AST.Operators" "purescript-0.15.12-5l1zT9m1jq0GgrLEUvYibC" 'False) (C1 ('MetaCons "Infixl" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Infixr" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Infix" 'PrefixI 'False) (U1 :: Type -> Type)))

data Fixity #

Fixity data for infix operators

Constructors

Fixity Associativity Precedence |

#### Instances

Instances details

ToJSON Fixity # |
Instance details Defined in Language.PureScript.AST.Operators Methods toJSON :: Fixity -> Value # toEncoding :: Fixity -> Encoding # toJSONList :: [Fixity] -> Value # toEncodingList :: [Fixity] -> Encoding # omitField :: Fixity -> Bool #
Generic Fixity # |
Instance details Defined in Language.PureScript.AST.Operators Associated Types type Rep Fixity :: Type -> Type # Methods from :: Fixity -> Rep Fixity x # to :: Rep Fixity x -> Fixity #
Show Fixity # |
Instance details Defined in Language.PureScript.AST.Operators Methods showsPrec :: Int -> Fixity -> ShowS # show :: Fixity -> String # showList :: [Fixity] -> ShowS #
NFData Fixity # |
Instance details Defined in Language.PureScript.AST.Operators Methods rnf :: Fixity -> () #
Eq Fixity # |
Instance details Defined in Language.PureScript.AST.Operators Methods (==) :: Fixity -> Fixity -> Bool # (/=) :: Fixity -> Fixity -> Bool #
Ord Fixity # |
Instance details Defined in Language.PureScript.AST.Operators Methods compare :: Fixity -> Fixity -> Ordering # (<) :: Fixity -> Fixity -> Bool # (<=) :: Fixity -> Fixity -> Bool # (>) :: Fixity -> Fixity -> Bool # (>=) :: Fixity -> Fixity -> Bool # max :: Fixity -> Fixity -> Fixity # min :: Fixity -> Fixity -> Fixity #
Serialise Fixity # |
Instance details Defined in Language.PureScript.AST.Operators Methods encode :: Fixity -> Encoding # decode :: Decoder s Fixity # encodeList :: [Fixity] -> Encoding # decodeList :: Decoder s [Fixity] #
type Rep Fixity # |
Instance details Defined in Language.PureScript.AST.Operators type Rep Fixity = D1 ('MetaData "Fixity" "Language.PureScript.AST.Operators" "purescript-0.15.12-5l1zT9m1jq0GgrLEUvYibC" 'False) (C1 ('MetaCons "Fixity" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Associativity) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Precedence)))

data Substitution #

A substitution of unification variables for types.

Constructors

Substitution |
Fields substType :: Map Int SourceType Type substitution substUnsolved :: Map Int (UnkLevel, SourceType) Unsolved unification variables with their level (scope ordering) and kind substNames :: Map Int Text The original names of unknowns

data TypeMap #

A map from rigid type variable name/unknown variable pairs to new variables.

Constructors

TypeMap |
Fields umSkolemMap :: Map Int (String, Int, Maybe SourceSpan) a map from skolems to their new names, including source and naming info umUnknownMap :: Map Int Int a map from unification variables to their new names umNextIndex :: Int unknowns and skolems share a source of names during renaming, to avoid overlaps in error messages. This is the next label for either case.

#### Instances

Instances details

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

type Unknown = Int #

Unification variables

type Supply = SupplyT Identity #

newtype SupplyT m a #

Constructors

SupplyT |
Fields unSupplyT :: StateT Integer m a

#### Instances

Instances details

MonadTrans SupplyT # |
Instance details Defined in Control.Monad.Supply Methods lift :: Monad m => m a -> SupplyT m a #
MonadError e m => MonadError e (SupplyT m) # |
Instance details Defined in Control.Monad.Supply Methods throwError :: e -> SupplyT m a # catchError :: SupplyT m a -> (e -> SupplyT m a) -> SupplyT m a #
MonadReader r m => MonadReader r (SupplyT m) # |
Instance details Defined in Control.Monad.Supply Methods ask :: SupplyT m r # local :: (r -> r) -> SupplyT m a -> SupplyT m a # reader :: (r -> a) -> SupplyT m a #
MonadWriter w m => MonadWriter w (SupplyT m) # |
Instance details Defined in Control.Monad.Supply Methods writer :: (a, w) -> SupplyT m a tell :: w -> SupplyT m () listen :: SupplyT m a -> SupplyT m (a, w) pass :: SupplyT m (a, w -> w) -> SupplyT m a
MonadPlus m => Alternative (SupplyT m) # |
Instance details Defined in Control.Monad.Supply Methods empty :: SupplyT m a # (<|>) :: SupplyT m a -> SupplyT m a -> SupplyT m a # some :: SupplyT m a -> SupplyT m [a] # many :: SupplyT m a -> SupplyT m [a] #
Monad m => Applicative (SupplyT m) # |
Instance details Defined in Control.Monad.Supply Methods pure :: a -> SupplyT m a # (<*>) :: SupplyT m (a -> b) -> SupplyT m a -> SupplyT m b # liftA2 :: (a -> b -> c) -> SupplyT m a -> SupplyT m b -> SupplyT m c # (*>) :: SupplyT m a -> SupplyT m b -> SupplyT m b # (<*) :: SupplyT m a -> SupplyT m b -> SupplyT m a #
Functor m => Functor (SupplyT m) # |
Instance details Defined in Control.Monad.Supply Methods fmap :: (a -> b) -> SupplyT m a -> SupplyT m b # (<$) :: a -> SupplyT m b -> SupplyT m a #
Monad m => Monad (SupplyT m) # |
Instance details Defined in Control.Monad.Supply Methods (>>=) :: SupplyT m a -> (a -> SupplyT m b) -> SupplyT m b # (>>) :: SupplyT m a -> SupplyT m b -> SupplyT m b # return :: a -> SupplyT m a #
MonadPlus m => MonadPlus (SupplyT m) # |
Instance details Defined in Control.Monad.Supply Methods mzero :: SupplyT m a # mplus :: SupplyT m a -> SupplyT m a -> SupplyT m a #
Monad m => MonadSupply (SupplyT m) # |
Instance details Defined in Control.Monad.Supply.Class Methods fresh :: SupplyT m Integer # peek :: SupplyT m Integer #

newtype Make a #

A monad for running make actions

Constructors

Make |
Fields unMake :: ReaderT Options (ExceptT MultipleErrors (Logger MultipleErrors)) a

#### Instances

Instances details

MonadIO Make # |
Instance details Defined in Language.PureScript.Make.Monad Methods liftIO :: IO a -> Make a #
Applicative Make # |
Instance details Defined in Language.PureScript.Make.Monad Methods pure :: a -> Make a # (<*>) :: Make (a -> b) -> Make a -> Make b # liftA2 :: (a -> b -> c) -> Make a -> Make b -> Make c # (*>) :: Make a -> Make b -> Make b # (<*) :: Make a -> Make b -> Make a #
Functor Make # |
Instance details Defined in Language.PureScript.Make.Monad Methods fmap :: (a -> b) -> Make a -> Make b # (<$) :: a -> Make b -> Make a #
Monad Make # |
Instance details Defined in Language.PureScript.Make.Monad Methods (>>=) :: Make a -> (a -> Make b) -> Make b # (>>) :: Make a -> Make b -> Make b # return :: a -> Make a #
MonadBaseControl IO Make # |
Instance details Defined in Language.PureScript.Make.Monad Associated Types type StM Make a # Methods liftBaseWith :: (RunInBase Make IO -> IO a) -> Make a # restoreM :: StM Make a -> Make a #
MonadError MultipleErrors Make # |
Instance details Defined in Language.PureScript.Make.Monad Methods throwError :: MultipleErrors -> Make a # catchError :: Make a -> (MultipleErrors -> Make a) -> Make a #
MonadReader Options Make # |
Instance details Defined in Language.PureScript.Make.Monad Methods ask :: Make Options # local :: (Options -> Options) -> Make a -> Make a # reader :: (Options -> a) -> Make a #
MonadWriter MultipleErrors Make # |
Instance details Defined in Language.PureScript.Make.Monad Methods writer :: (a, MultipleErrors) -> Make a tell :: MultipleErrors -> Make () listen :: Make a -> Make (a, MultipleErrors) pass :: Make (a, MultipleErrors -> MultipleErrors) -> Make a
MonadBase IO Make # |
Instance details Defined in Language.PureScript.Make.Monad Methods liftBase :: IO α -> Make α #
type StM Make a # |
Instance details Defined in Language.PureScript.Make.Monad type StM Make a = Either MultipleErrors a

data SourcePos #

Source position information

Constructors

SourcePos |
Fields sourcePosLine :: Int Line number sourcePosColumn :: Int Column number

#### Instances

Instances details

FromJSON SourcePos # |
Instance details Defined in Language.PureScript.AST.SourcePos Methods parseJSON :: Value -> Parser SourcePos # parseJSONList :: Value -> Parser [SourcePos] # omittedField :: Maybe SourcePos #
ToJSON SourcePos # |
Instance details Defined in Language.PureScript.AST.SourcePos Methods toJSON :: SourcePos -> Value # toEncoding :: SourcePos -> Encoding # toJSONList :: [SourcePos] -> Value # toEncodingList :: [SourcePos] -> Encoding # omitField :: SourcePos -> Bool #
Generic SourcePos # |
Instance details Defined in Language.PureScript.AST.SourcePos Associated Types type Rep SourcePos :: Type -> Type # Methods from :: SourcePos -> Rep SourcePos x # to :: Rep SourcePos x -> SourcePos #
Show SourcePos # |
Instance details Defined in Language.PureScript.AST.SourcePos Methods showsPrec :: Int -> SourcePos -> ShowS # show :: SourcePos -> String # showList :: [SourcePos] -> ShowS #
NFData SourcePos # |
Instance details Defined in Language.PureScript.AST.SourcePos Methods rnf :: SourcePos -> () #
Eq SourcePos # |
Instance details Defined in Language.PureScript.AST.SourcePos Methods (==) :: SourcePos -> SourcePos -> Bool # (/=) :: SourcePos -> SourcePos -> Bool #
Ord SourcePos # |
Instance details Defined in Language.PureScript.AST.SourcePos Methods compare :: SourcePos -> SourcePos -> Ordering # (<) :: SourcePos -> SourcePos -> Bool # (<=) :: SourcePos -> SourcePos -> Bool # (>) :: SourcePos -> SourcePos -> Bool # (>=) :: SourcePos -> SourcePos -> Bool # max :: SourcePos -> SourcePos -> SourcePos # min :: SourcePos -> SourcePos -> SourcePos #
Serialise SourcePos # |
Instance details Defined in Language.PureScript.AST.SourcePos Methods encode :: SourcePos -> Encoding # decode :: Decoder s SourcePos # encodeList :: [SourcePos] -> Encoding # decodeList :: Decoder s [SourcePos] #
type Rep SourcePos # |
Instance details Defined in Language.PureScript.AST.SourcePos type Rep SourcePos = D1 ('MetaData "SourcePos" "Language.PureScript.AST.SourcePos" "purescript-0.15.12-5l1zT9m1jq0GgrLEUvYibC" 'False) (C1 ('MetaCons "SourcePos" 'PrefixI 'True) (S1 ('MetaSel ('Just "sourcePosLine") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "sourcePosColumn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)))

data SourceSpan #

Constructors

SourceSpan |
Fields spanName :: String Source name spanStart :: SourcePos Start of the span spanEnd :: SourcePos End of the span

#### Instances

Instances details

FromJSON SourceSpan # |
Instance details Defined in Language.PureScript.AST.SourcePos Methods parseJSON :: Value -> Parser SourceSpan # parseJSONList :: Value -> Parser [SourceSpan] # omittedField :: Maybe SourceSpan #
ToJSON SourceSpan # |
Instance details Defined in Language.PureScript.AST.SourcePos Methods toJSON :: SourceSpan -> Value # toEncoding :: SourceSpan -> Encoding # toJSONList :: [SourceSpan] -> Value # toEncodingList :: [SourceSpan] -> Encoding # omitField :: SourceSpan -> Bool #
Generic SourceSpan # |
Instance details Defined in Language.PureScript.AST.SourcePos Associated Types type Rep SourceSpan :: Type -> Type # Methods from :: SourceSpan -> Rep SourceSpan x # to :: Rep SourceSpan x -> SourceSpan #
Show SourceSpan # |
Instance details Defined in Language.PureScript.AST.SourcePos Methods showsPrec :: Int -> SourceSpan -> ShowS # show :: SourceSpan -> String # showList :: [SourceSpan] -> ShowS #
NFData SourceSpan # |
Instance details Defined in Language.PureScript.AST.SourcePos Methods rnf :: SourceSpan -> () #
Eq SourceSpan # |
Instance details Defined in Language.PureScript.AST.SourcePos Methods (==) :: SourceSpan -> SourceSpan -> Bool # (/=) :: SourceSpan -> SourceSpan -> Bool #
Ord SourceSpan # |
Instance details Defined in Language.PureScript.AST.SourcePos Methods compare :: SourceSpan -> SourceSpan -> Ordering # (<) :: SourceSpan -> SourceSpan -> Bool # (<=) :: SourceSpan -> SourceSpan -> Bool # (>) :: SourceSpan -> SourceSpan -> Bool # (>=) :: SourceSpan -> SourceSpan -> Bool # max :: SourceSpan -> SourceSpan -> SourceSpan # min :: SourceSpan -> SourceSpan -> SourceSpan #
Serialise SourceSpan # |
Instance details Defined in Language.PureScript.AST.SourcePos Methods encode :: SourceSpan -> Encoding # decode :: Decoder s SourceSpan # encodeList :: [SourceSpan] -> Encoding # decodeList :: Decoder s [SourceSpan] #
FromJSON (Constraint SourceAnn) # |
Instance details Defined in Language.PureScript.Types Methods parseJSON :: Value -> Parser (Constraint SourceAnn) # parseJSONList :: Value -> Parser [Constraint SourceAnn] # omittedField :: Maybe (Constraint SourceAnn) #
FromJSON (Type SourceAnn) # |
Instance details Defined in Language.PureScript.Types Methods parseJSON :: Value -> Parser (Type SourceAnn) # parseJSONList :: Value -> Parser [Type SourceAnn] # omittedField :: Maybe (Type SourceAnn) #
type Rep SourceSpan # |
Instance details Defined in Language.PureScript.AST.SourcePos type Rep SourceSpan = D1 ('MetaData "SourceSpan" "Language.PureScript.AST.SourcePos" "purescript-0.15.12-5l1zT9m1jq0GgrLEUvYibC" 'False) (C1 ('MetaCons "SourceSpan" 'PrefixI 'True) (S1 ('MetaSel ('Just "spanName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: (S1 ('MetaSel ('Just "spanStart") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourcePos) :*: S1 ('MetaSel ('Just "spanEnd") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourcePos))))

newtype OpName (a :: OpNameType) #

Operator alias names.

Constructors

OpName |
Fields runOpName :: Text

#### Instances

Instances details

FromJSON (OpName a) # |
Instance details Defined in Language.PureScript.Names Methods parseJSON :: Value -> Parser (OpName a) # parseJSONList :: Value -> Parser [OpName a] # omittedField :: Maybe (OpName a) #
ToJSON (OpName a) # |
Instance details Defined in Language.PureScript.Names Methods toJSON :: OpName a -> Value # toEncoding :: OpName a -> Encoding # toJSONList :: [OpName a] -> Value # toEncodingList :: [OpName a] -> Encoding # omitField :: OpName a -> Bool #
Generic (OpName a) # |
Instance details Defined in Language.PureScript.Names Associated Types type Rep (OpName a) :: Type -> Type # Methods from :: OpName a -> Rep (OpName a) x # to :: Rep (OpName a) x -> OpName a #
Show (OpName a) # |
Instance details Defined in Language.PureScript.Names Methods showsPrec :: Int -> OpName a -> ShowS # show :: OpName a -> String # showList :: [OpName a] -> ShowS #
NFData (OpName a) # |
Instance details Defined in Language.PureScript.Names Methods rnf :: OpName a -> () #
Eq (OpName a) # |
Instance details Defined in Language.PureScript.Names Methods (==) :: OpName a -> OpName a -> Bool # (/=) :: OpName a -> OpName a -> Bool #
Ord (OpName a) # |
Instance details Defined in Language.PureScript.Names Methods compare :: OpName a -> OpName a -> Ordering # (<) :: OpName a -> OpName a -> Bool # (<=) :: OpName a -> OpName a -> Bool # (>) :: OpName a -> OpName a -> Bool # (>=) :: OpName a -> OpName a -> Bool # max :: OpName a -> OpName a -> OpName a # min :: OpName a -> OpName a -> OpName a #
Serialise (OpName a) # |
Instance details Defined in Language.PureScript.Names Methods encode :: OpName a -> Encoding # decode :: Decoder s (OpName a) # encodeList :: [OpName a] -> Encoding # decodeList :: Decoder s [OpName a] #
type Rep (OpName a) # |
Instance details Defined in Language.PureScript.Names type Rep (OpName a) = D1 ('MetaData "OpName" "Language.PureScript.Names" "purescript-0.15.12-5l1zT9m1jq0GgrLEUvYibC" 'True) (C1 ('MetaCons "OpName" 'PrefixI 'True) (S1 ('MetaSel ('Just "runOpName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

data OpNameType #

The closed set of operator alias types.

Constructors

ValueOpName |
TypeOpName |
AnyOpName |

newtype ProperName (a :: ProperNameType) #

Proper names, i.e. capitalized names for e.g. module names, type//data constructors.

Constructors

ProperName |
Fields runProperName :: Text

#### Instances

Instances details

FromJSON (ProperName a) # |
Instance details Defined in Language.PureScript.Names Methods parseJSON :: Value -> Parser (ProperName a) # parseJSONList :: Value -> Parser [ProperName a] # omittedField :: Maybe (ProperName a) #
ToJSON (ProperName a) # |
Instance details Defined in Language.PureScript.Names Methods toJSON :: ProperName a -> Value # toEncoding :: ProperName a -> Encoding # toJSONList :: [ProperName a] -> Value # toEncodingList :: [ProperName a] -> Encoding # omitField :: ProperName a -> Bool #
Generic (ProperName a) # |
Instance details Defined in Language.PureScript.Names Associated Types type Rep (ProperName a) :: Type -> Type # Methods from :: ProperName a -> Rep (ProperName a) x # to :: Rep (ProperName a) x -> ProperName a #
Show (ProperName a) # |
Instance details Defined in Language.PureScript.Names Methods showsPrec :: Int -> ProperName a -> ShowS # show :: ProperName a -> String # showList :: [ProperName a] -> ShowS #
NFData (ProperName a) # |
Instance details Defined in Language.PureScript.Names Methods rnf :: ProperName a -> () #
Eq (ProperName a) # |
Instance details Defined in Language.PureScript.Names Methods (==) :: ProperName a -> ProperName a -> Bool # (/=) :: ProperName a -> ProperName a -> Bool #
Ord (ProperName a) # |
Instance details Defined in Language.PureScript.Names Methods compare :: ProperName a -> ProperName a -> Ordering # (<) :: ProperName a -> ProperName a -> Bool # (<=) :: ProperName a -> ProperName a -> Bool # (>) :: ProperName a -> ProperName a -> Bool # (>=) :: ProperName a -> ProperName a -> Bool # max :: ProperName a -> ProperName a -> ProperName a # min :: ProperName a -> ProperName a -> ProperName a #
Serialise (ProperName a) # |
Instance details Defined in Language.PureScript.Names Methods encode :: ProperName a -> Encoding # decode :: Decoder s (ProperName a) # encodeList :: [ProperName a] -> Encoding # decodeList :: Decoder s [ProperName a] #
type Rep (ProperName a) # |
Instance details Defined in Language.PureScript.Names type Rep (ProperName a) = D1 ('MetaData "ProperName" "Language.PureScript.Names" "purescript-0.15.12-5l1zT9m1jq0GgrLEUvYibC" 'True) (C1 ('MetaCons "ProperName" 'PrefixI 'True) (S1 ('MetaSel ('Just "runProperName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

data ProperNameType #

The closed set of proper name types.

Constructors

TypeName |
ConstructorName |
ClassName |
Namespace |

data Qualified a #

A qualified name, i.e. a name with an optional module name

Constructors

Qualified QualifiedBy a |

#### Instances

Instances details

Foldable Qualified # |
Instance details Defined in Language.PureScript.Names Methods fold :: Monoid m => Qualified m -> m # foldMap :: Monoid m => (a -> m) -> Qualified a -> m # foldMap' :: Monoid m => (a -> m) -> Qualified a -> m foldr :: (a -> b -> b) -> b -> Qualified a -> b # foldr' :: (a -> b -> b) -> b -> Qualified a -> b # foldl :: (b -> a -> b) -> b -> Qualified a -> b # foldl' :: (b -> a -> b) -> b -> Qualified a -> b # foldr1 :: (a -> a -> a) -> Qualified a -> a # foldl1 :: (a -> a -> a) -> Qualified a -> a # toList :: Qualified a -> [a] # null :: Qualified a -> Bool # length :: Qualified a -> Int # elem :: Eq a => a -> Qualified a -> Bool # maximum :: Ord a => Qualified a -> a # minimum :: Ord a => Qualified a -> a # sum :: Num a => Qualified a -> a # product :: Num a => Qualified a -> a #
Traversable Qualified # |
Instance details Defined in Language.PureScript.Names Methods traverse :: Applicative f => (a -> f b) -> Qualified a -> f (Qualified b) # sequenceA :: Applicative f => Qualified (f a) -> f (Qualified a) mapM :: Monad m => (a -> m b) -> Qualified a -> m (Qualified b) sequence :: Monad m => Qualified (m a) -> m (Qualified a)
Functor Qualified # |
Instance details Defined in Language.PureScript.Names Methods fmap :: (a -> b) -> Qualified a -> Qualified b # (<$) :: a -> Qualified b -> Qualified a #
FromJSON a => FromJSON (Qualified a) # |
Instance details Defined in Language.PureScript.Names Methods parseJSON :: Value -> Parser (Qualified a) # parseJSONList :: Value -> Parser [Qualified a] # omittedField :: Maybe (Qualified a) #
ToJSON a => ToJSON (Qualified a) # |
Instance details Defined in Language.PureScript.Names Methods toJSON :: Qualified a -> Value # toEncoding :: Qualified a -> Encoding # toJSONList :: [Qualified a] -> Value # toEncodingList :: [Qualified a] -> Encoding # omitField :: Qualified a -> Bool #
Generic (Qualified a) # |
Instance details Defined in Language.PureScript.Names Associated Types type Rep (Qualified a) :: Type -> Type # Methods from :: Qualified a -> Rep (Qualified a) x # to :: Rep (Qualified a) x -> Qualified a #
Show a => Show (Qualified a) # |
Instance details Defined in Language.PureScript.Names Methods showsPrec :: Int -> Qualified a -> ShowS # show :: Qualified a -> String # showList :: [Qualified a] -> ShowS #
NFData a => NFData (Qualified a) # |
Instance details Defined in Language.PureScript.Names Methods rnf :: Qualified a -> () #
Eq a => Eq (Qualified a) # |
Instance details Defined in Language.PureScript.Names Methods (==) :: Qualified a -> Qualified a -> Bool # (/=) :: Qualified a -> Qualified a -> Bool #
Ord a => Ord (Qualified a) # |
Instance details Defined in Language.PureScript.Names Methods compare :: Qualified a -> Qualified a -> Ordering # (<) :: Qualified a -> Qualified a -> Bool # (<=) :: Qualified a -> Qualified a -> Bool # (>) :: Qualified a -> Qualified a -> Bool # (>=) :: Qualified a -> Qualified a -> Bool # max :: Qualified a -> Qualified a -> Qualified a # min :: Qualified a -> Qualified a -> Qualified a #
Serialise a => Serialise (Qualified a) # |
Instance details Defined in Language.PureScript.Names Methods encode :: Qualified a -> Encoding # decode :: Decoder s (Qualified a) # encodeList :: [Qualified a] -> Encoding # decodeList :: Decoder s [Qualified a] #
type Rep (Qualified a) # |
Instance details Defined in Language.PureScript.Names type Rep (Qualified a) = D1 ('MetaData "Qualified" "Language.PureScript.Names" "purescript-0.15.12-5l1zT9m1jq0GgrLEUvYibC" 'False) (C1 ('MetaCons "Qualified" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 QualifiedBy) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

type SourceType = Type SourceAnn #

data Binder #

Data type for binders

Constructors

NullBinder | Wildcard binder
LiteralBinder SourceSpan (Literal Binder) | A binder which matches a literal
VarBinder SourceSpan Ident | A binder which binds an identifier
ConstructorBinder SourceSpan (Qualified (ProperName 'ConstructorName)) [Binder] | A binder which matches a data constructor
OpBinder SourceSpan (Qualified (OpName 'ValueOpName)) | A operator alias binder. During the rebracketing phase of desugaring, this data constructor will be removed.
BinaryNoParensBinder Binder Binder Binder | Binary operator application. During the rebracketing phase of desugaring, this data constructor will be removed.
ParensInBinder Binder | 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.
NamedBinder SourceSpan Ident Binder | A binder which binds its input to an identifier
PositionedBinder SourceSpan [Comment] Binder | A binder with source position information
TypedBinder SourceType Binder | A binder with a type annotation

#### Instances

Instances details

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

type SourceAnn = (SourceSpan, [Comment]) #

Source annotation - position information and comments.

type SourceConstraint = Constraint SourceAnn #

newtype ModuleName #

Module names

Constructors

ModuleName Text |

#### Instances

Instances details

FromJSON ModuleName # |
Instance details Defined in Language.PureScript.Names Methods parseJSON :: Value -> Parser ModuleName # parseJSONList :: Value -> Parser [ModuleName] # omittedField :: Maybe ModuleName #
FromJSONKey ModuleName # |
Instance details Defined in Language.PureScript.Names Methods fromJSONKey :: FromJSONKeyFunction ModuleName # fromJSONKeyList :: FromJSONKeyFunction [ModuleName] #
ToJSON ModuleName # |
Instance details Defined in Language.PureScript.Names Methods toJSON :: ModuleName -> Value # toEncoding :: ModuleName -> Encoding # toJSONList :: [ModuleName] -> Value # toEncodingList :: [ModuleName] -> Encoding # omitField :: ModuleName -> Bool #
ToJSONKey ModuleName # |
Instance details Defined in Language.PureScript.Names Methods toJSONKey :: ToJSONKeyFunction ModuleName # toJSONKeyList :: ToJSONKeyFunction [ModuleName] #
Generic ModuleName # |
Instance details Defined in Language.PureScript.Names Associated Types type Rep ModuleName :: Type -> Type # Methods from :: ModuleName -> Rep ModuleName x # to :: Rep ModuleName x -> ModuleName #
Show ModuleName # |
Instance details Defined in Language.PureScript.Names Methods showsPrec :: Int -> ModuleName -> ShowS # show :: ModuleName -> String # showList :: [ModuleName] -> ShowS #
NFData ModuleName # |
Instance details Defined in Language.PureScript.Names Methods rnf :: ModuleName -> () #
Eq ModuleName # |
Instance details Defined in Language.PureScript.Names Methods (==) :: ModuleName -> ModuleName -> Bool # (/=) :: ModuleName -> ModuleName -> Bool #
Ord ModuleName # |
Instance details Defined in Language.PureScript.Names Methods compare :: ModuleName -> ModuleName -> Ordering # (<) :: ModuleName -> ModuleName -> Bool # (<=) :: ModuleName -> ModuleName -> Bool # (>) :: ModuleName -> ModuleName -> Bool # (>=) :: ModuleName -> ModuleName -> Bool # max :: ModuleName -> ModuleName -> ModuleName # min :: ModuleName -> ModuleName -> ModuleName #
Serialise ModuleName # |
Instance details Defined in Language.PureScript.Names Methods encode :: ModuleName -> Encoding # decode :: Decoder s ModuleName # encodeList :: [ModuleName] -> Encoding # decodeList :: Decoder s [ModuleName] #
type Rep ModuleName # |
Instance details Defined in Language.PureScript.Names type Rep ModuleName = D1 ('MetaData "ModuleName" "Language.PureScript.Names" "purescript-0.15.12-5l1zT9m1jq0GgrLEUvYibC" 'True) (C1 ('MetaCons "ModuleName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

data QualifiedBy #

Constructors

BySourcePos SourcePos |
ByModuleName ModuleName |

#### Instances

Instances details

Generic QualifiedBy # |
Instance details Defined in Language.PureScript.Names Associated Types type Rep QualifiedBy :: Type -> Type # Methods from :: QualifiedBy -> Rep QualifiedBy x # to :: Rep QualifiedBy x -> QualifiedBy #
Show QualifiedBy # |
Instance details Defined in Language.PureScript.Names Methods showsPrec :: Int -> QualifiedBy -> ShowS # show :: QualifiedBy -> String # showList :: [QualifiedBy] -> ShowS #
NFData QualifiedBy # |
Instance details Defined in Language.PureScript.Names Methods rnf :: QualifiedBy -> () #
Eq QualifiedBy # |
Instance details Defined in Language.PureScript.Names Methods (==) :: QualifiedBy -> QualifiedBy -> Bool # (/=) :: QualifiedBy -> QualifiedBy -> Bool #
Ord QualifiedBy # |
Instance details Defined in Language.PureScript.Names Methods compare :: QualifiedBy -> QualifiedBy -> Ordering # (<) :: QualifiedBy -> QualifiedBy -> Bool # (<=) :: QualifiedBy -> QualifiedBy -> Bool # (>) :: QualifiedBy -> QualifiedBy -> Bool # (>=) :: QualifiedBy -> QualifiedBy -> Bool # max :: QualifiedBy -> QualifiedBy -> QualifiedBy # min :: QualifiedBy -> QualifiedBy -> QualifiedBy #
Serialise QualifiedBy # |
Instance details Defined in Language.PureScript.Names Methods encode :: QualifiedBy -> Encoding # decode :: Decoder s QualifiedBy # encodeList :: [QualifiedBy] -> Encoding # decodeList :: Decoder s [QualifiedBy] #
type Rep QualifiedBy # |
Instance details Defined in Language.PureScript.Names type Rep QualifiedBy = D1 ('MetaData "QualifiedBy" "Language.PureScript.Names" "purescript-0.15.12-5l1zT9m1jq0GgrLEUvYibC" 'False) (C1 ('MetaCons "BySourcePos" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourcePos)) :+: C1 ('MetaCons "ByModuleName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ModuleName)))

data DataDeclType #

The type ('data' or 'newtype') of a data type declaration

Constructors

Data | A standard data constructor
Newtype | A newtype constructor

#### Instances

Instances details

FromJSON DataDeclType # |
Instance details Defined in Language.PureScript.Environment Methods parseJSON :: Value -> Parser DataDeclType # parseJSONList :: Value -> Parser [DataDeclType] # omittedField :: Maybe DataDeclType #
ToJSON DataDeclType # |
Instance details Defined in Language.PureScript.Environment Methods toJSON :: DataDeclType -> Value # toEncoding :: DataDeclType -> Encoding # toJSONList :: [DataDeclType] -> Value # toEncodingList :: [DataDeclType] -> Encoding # omitField :: DataDeclType -> Bool #
Generic DataDeclType # |
Instance details Defined in Language.PureScript.Environment Associated Types type Rep DataDeclType :: Type -> Type # Methods from :: DataDeclType -> Rep DataDeclType x # to :: Rep DataDeclType x -> DataDeclType #
Show DataDeclType # |
Instance details Defined in Language.PureScript.Environment Methods showsPrec :: Int -> DataDeclType -> ShowS # show :: DataDeclType -> String # showList :: [DataDeclType] -> ShowS #
NFData DataDeclType # |
Instance details Defined in Language.PureScript.Environment Methods rnf :: DataDeclType -> () #
Eq DataDeclType # |
Instance details Defined in Language.PureScript.Environment Methods (==) :: DataDeclType -> DataDeclType -> Bool # (/=) :: DataDeclType -> DataDeclType -> Bool #
Ord DataDeclType # |
Instance details Defined in Language.PureScript.Environment Methods compare :: DataDeclType -> DataDeclType -> Ordering # (<) :: DataDeclType -> DataDeclType -> Bool # (<=) :: DataDeclType -> DataDeclType -> Bool # (>) :: DataDeclType -> DataDeclType -> Bool # (>=) :: DataDeclType -> DataDeclType -> Bool # max :: DataDeclType -> DataDeclType -> DataDeclType # min :: DataDeclType -> DataDeclType -> DataDeclType #
Serialise DataDeclType # |
Instance details Defined in Language.PureScript.Environment Methods encode :: DataDeclType -> Encoding # decode :: Decoder s DataDeclType # encodeList :: [DataDeclType] -> Encoding # decodeList :: Decoder s [DataDeclType] #
type Rep DataDeclType # |
Instance details Defined in Language.PureScript.Environment type Rep DataDeclType = D1 ('MetaData "DataDeclType" "Language.PureScript.Environment" "purescript-0.15.12-5l1zT9m1jq0GgrLEUvYibC" 'False) (C1 ('MetaCons "Data" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Newtype" 'PrefixI 'False) (U1 :: Type -> Type))

data FunctionalDependency #

A functional dependency indicates a relationship between two sets of type arguments in a class declaration.

Constructors

FunctionalDependency |
Fields fdDeterminers :: [Int] the type arguments which determine the determined type arguments fdDetermined :: [Int] the determined type arguments

#### Instances

Instances details

FromJSON FunctionalDependency # |
Instance details Defined in Language.PureScript.Environment Methods parseJSON :: Value -> Parser FunctionalDependency # parseJSONList :: Value -> Parser [FunctionalDependency] # omittedField :: Maybe FunctionalDependency #
ToJSON FunctionalDependency # |
Instance details Defined in Language.PureScript.Environment Methods toJSON :: FunctionalDependency -> Value # toEncoding :: FunctionalDependency -> Encoding # toJSONList :: [FunctionalDependency] -> Value # toEncodingList :: [FunctionalDependency] -> Encoding # omitField :: FunctionalDependency -> Bool #
Generic FunctionalDependency # |
Instance details Defined in Language.PureScript.Environment Associated Types type Rep FunctionalDependency :: Type -> Type # Methods from :: FunctionalDependency -> Rep FunctionalDependency x # to :: Rep FunctionalDependency x -> FunctionalDependency #
Show FunctionalDependency # |
Instance details Defined in Language.PureScript.Environment Methods showsPrec :: Int -> FunctionalDependency -> ShowS # show :: FunctionalDependency -> String # showList :: [FunctionalDependency] -> ShowS #
NFData FunctionalDependency # |
Instance details Defined in Language.PureScript.Environment Methods rnf :: FunctionalDependency -> () #
Serialise FunctionalDependency # |
Instance details Defined in Language.PureScript.Environment Methods encode :: FunctionalDependency -> Encoding # decode :: Decoder s FunctionalDependency # encodeList :: [FunctionalDependency] -> Encoding # decodeList :: Decoder s [FunctionalDependency] #
type Rep FunctionalDependency # |
Instance details Defined in Language.PureScript.Environment type Rep FunctionalDependency = D1 ('MetaData "FunctionalDependency" "Language.PureScript.Environment" "purescript-0.15.12-5l1zT9m1jq0GgrLEUvYibC" 'False) (C1 ('MetaCons "FunctionalDependency" 'PrefixI 'True) (S1 ('MetaSel ('Just "fdDeterminers") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Int]) :*: S1 ('MetaSel ('Just "fdDetermined") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Int])))

data NameKind #

A flag for whether a name is for an private or public value - only public values will be included in a generated externs file.

Constructors

Private | A private value introduced as an artifact of code generation (class instances, class member accessors, etc.)
Public | A public value for a module member or foreign import declaration
External | A name for member introduced by foreign import

#### Instances

Instances details

Generic NameKind # |
Instance details Defined in Language.PureScript.Environment Associated Types type Rep NameKind :: Type -> Type # Methods from :: NameKind -> Rep NameKind x # to :: Rep NameKind x -> NameKind #
Show NameKind # |
Instance details Defined in Language.PureScript.Environment Methods showsPrec :: Int -> NameKind -> ShowS # show :: NameKind -> String # showList :: [NameKind] -> ShowS #
NFData NameKind # |
Instance details Defined in Language.PureScript.Environment Methods rnf :: NameKind -> () #
Eq NameKind # |
Instance details Defined in Language.PureScript.Environment Methods (==) :: NameKind -> NameKind -> Bool # (/=) :: NameKind -> NameKind -> Bool #
Serialise NameKind # |
Instance details Defined in Language.PureScript.Environment Methods encode :: NameKind -> Encoding # decode :: Decoder s NameKind # encodeList :: [NameKind] -> Encoding # decodeList :: Decoder s [NameKind] #
type Rep NameKind # |
Instance details Defined in Language.PureScript.Environment type Rep NameKind = D1 ('MetaData "NameKind" "Language.PureScript.Environment" "purescript-0.15.12-5l1zT9m1jq0GgrLEUvYibC" 'False) (C1 ('MetaCons "Private" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Public" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "External" 'PrefixI 'False) (U1 :: Type -> Type)))

data DataConstructorDeclaration #

Constructors

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

#### Instances

Instances details

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 #

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

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

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 #
Generic DeclarationRef # |
Instance details Defined in Language.PureScript.AST.Declarations Associated Types type Rep DeclarationRef :: Type -> Type # 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 #
NFData DeclarationRef # |
Instance details Defined in Language.PureScript.AST.Declarations Methods rnf :: DeclarationRef -> () #
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.12-5l1zT9m1jq0GgrLEUvYibC" '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 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

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

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

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

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

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

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

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

data GuardedExpr #

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

Constructors

GuardedExpr [Guard] Expr |

#### Instances

Instances details

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

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

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 #

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

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

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

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

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

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

data SimpleErrorMessage #

A type of error messages

Constructors

InternalCompilerError Text Text |
ModuleNotFound ModuleName |
ErrorParsingFFIModule FilePath (Maybe ErrorMessage) |
ErrorParsingCSTModule ParserError |
WarningParsingCSTModule ParserWarning |
MissingFFIModule ModuleName |
UnnecessaryFFIModule ModuleName FilePath |
MissingFFIImplementations ModuleName [Ident] |
UnusedFFIImplementations ModuleName [Ident] |
InvalidFFIIdentifier ModuleName Text |
DeprecatedFFIPrime ModuleName Text |
DeprecatedFFICommonJSModule ModuleName FilePath |
UnsupportedFFICommonJSExports ModuleName [Text] |
UnsupportedFFICommonJSImports ModuleName [Text] |
FileIOError Text IOError | A description of what we were trying to do, and the error which occurred
InfiniteType SourceType |
InfiniteKind SourceType |
MultipleValueOpFixities (OpName 'ValueOpName) |
MultipleTypeOpFixities (OpName 'TypeOpName) |
OrphanTypeDeclaration Ident |
OrphanKindDeclaration (ProperName 'TypeName) |
OrphanRoleDeclaration (ProperName 'TypeName) |
RedefinedIdent Ident |
OverlappingNamesInLet Ident |
UnknownName (Qualified Name) |
UnknownImport ModuleName Name |
UnknownImportDataConstructor ModuleName (ProperName 'TypeName) (ProperName 'ConstructorName) |
UnknownExport Name |
UnknownExportDataConstructor (ProperName 'TypeName) (ProperName 'ConstructorName) |
ScopeConflict Name [ModuleName] |
ScopeShadowing Name (Maybe ModuleName) [ModuleName] |
DeclConflict Name Name |
ExportConflict (Qualified Name) (Qualified Name) |
DuplicateModule ModuleName |
DuplicateTypeClass (ProperName 'ClassName) SourceSpan |
DuplicateInstance Ident SourceSpan |
DuplicateTypeArgument Text |
InvalidDoBind |
InvalidDoLet |
CycleInDeclaration Ident |
CycleInTypeSynonym (NonEmpty (ProperName 'TypeName)) |
CycleInTypeClassDeclaration (NonEmpty (Qualified (ProperName 'ClassName))) |
CycleInKindDeclaration (NonEmpty (Qualified (ProperName 'TypeName))) |
CycleInModules (NonEmpty ModuleName) |
NameIsUndefined Ident |
UndefinedTypeVariable (ProperName 'TypeName) |
PartiallyAppliedSynonym (Qualified (ProperName 'TypeName)) |
EscapedSkolem Text (Maybe SourceSpan) SourceType |
TypesDoNotUnify SourceType SourceType |
KindsDoNotUnify SourceType SourceType |
ConstrainedTypeUnified SourceType SourceType |
OverlappingInstances (Qualified (ProperName 'ClassName)) [SourceType] [Qualified (Either SourceType Ident)] |
NoInstanceFound |
Fields SourceConstraint constraint that could not be solved [Qualified (Either SourceType Ident)] a list of instances that stopped further progress in instance chains due to ambiguity Bool whether eliminating unknowns with annotations might help
AmbiguousTypeVariables SourceType [(Text, Int)] |
UnknownClass (Qualified (ProperName 'ClassName)) |
PossiblyInfiniteInstance (Qualified (ProperName 'ClassName)) [SourceType] |
PossiblyInfiniteCoercibleInstance |
CannotDerive (Qualified (ProperName 'ClassName)) [SourceType] |
InvalidDerivedInstance (Qualified (ProperName 'ClassName)) [SourceType] Int |
ExpectedTypeConstructor (Qualified (ProperName 'ClassName)) [SourceType] SourceType |
InvalidNewtypeInstance (Qualified (ProperName 'ClassName)) [SourceType] |
MissingNewtypeSuperclassInstance (Qualified (ProperName 'ClassName)) (Qualified (ProperName 'ClassName)) [SourceType] |
UnverifiableSuperclassInstance (Qualified (ProperName 'ClassName)) (Qualified (ProperName 'ClassName)) [SourceType] |
CannotFindDerivingType (ProperName 'TypeName) |
DuplicateLabel Label (Maybe Expr) |
DuplicateValueDeclaration Ident |
ArgListLengthsDiffer Ident |
OverlappingArgNames (Maybe Ident) |
MissingClassMember (NonEmpty (Ident, SourceType)) |
ExtraneousClassMember Ident (Qualified (ProperName 'ClassName)) |
ExpectedType SourceType SourceType |
IncorrectConstructorArity (Qualified (ProperName 'ConstructorName)) Int Int | constructor name, expected argument count, actual argument count
ExprDoesNotHaveType Expr SourceType |
PropertyIsMissing Label |
AdditionalProperty Label |
OrphanInstance Ident (Qualified (ProperName 'ClassName)) (Set ModuleName) [SourceType] |
InvalidNewtype (ProperName 'TypeName) |
InvalidInstanceHead SourceType |
TransitiveExportError DeclarationRef [DeclarationRef] |
TransitiveDctorExportError DeclarationRef [ProperName 'ConstructorName] |
HiddenConstructors DeclarationRef (Qualified (ProperName 'ClassName)) |
ShadowedName Ident |
ShadowedTypeVar Text |
UnusedTypeVar Text |
UnusedName Ident |
UnusedDeclaration Ident |
WildcardInferredType SourceType Context |
HoleInferredType Text SourceType Context (Maybe TypeSearch) |
MissingTypeDeclaration Ident SourceType |
MissingKindDeclaration KindSignatureFor (ProperName 'TypeName) SourceType |
OverlappingPattern [[Binder]] Bool |
IncompleteExhaustivityCheck |
ImportHidingModule ModuleName |
UnusedImport ModuleName (Maybe ModuleName) |
UnusedExplicitImport ModuleName [Name] (Maybe ModuleName) [DeclarationRef] |
UnusedDctorImport ModuleName (ProperName 'TypeName) (Maybe ModuleName) [DeclarationRef] |
UnusedDctorExplicitImport ModuleName (ProperName 'TypeName) [ProperName 'ConstructorName] (Maybe ModuleName) [DeclarationRef] |
DuplicateSelectiveImport ModuleName |
DuplicateImport ModuleName ImportDeclarationType (Maybe ModuleName) |
DuplicateImportRef Name |
DuplicateExportRef Name |
IntOutOfRange Integer Text Integer Integer |
ImplicitQualifiedImport ModuleName ModuleName [DeclarationRef] |
ImplicitQualifiedImportReExport ModuleName ModuleName [DeclarationRef] |
ImplicitImport ModuleName [DeclarationRef] |
HidingImport ModuleName [DeclarationRef] |
CaseBinderLengthDiffers Int [Binder] |
IncorrectAnonymousArgument |
InvalidOperatorInBinder (Qualified (OpName 'ValueOpName)) (Qualified Ident) |
CannotGeneralizeRecursiveFunction Ident SourceType |
CannotDeriveNewtypeForData (ProperName 'TypeName) |
ExpectedWildcard (ProperName 'TypeName) |
CannotUseBindWithDo Ident |
ClassInstanceArityMismatch Ident (Qualified (ProperName 'ClassName)) Int Int | instance name, type class, expected argument count, actual argument count
UserDefinedWarning SourceType | a user-defined warning raised by using the Warn type class
UnusableDeclaration Ident [[Text]] | a declaration couldn't be used because it contained free variables
CannotDefinePrimModules ModuleName |
MixedAssociativityError (NonEmpty (Qualified (OpName 'AnyOpName), Associativity)) |
NonAssociativeError (NonEmpty (Qualified (OpName 'AnyOpName))) |
QuantificationCheckFailureInKind Text |
QuantificationCheckFailureInType [Int] SourceType |
VisibleQuantificationCheckFailureInType Text |
UnsupportedTypeInKind SourceType |
RoleMismatch | Declared role was more permissive than inferred.
Fields Text Type variable in question Role inferred role Role declared role
InvalidCoercibleInstanceDeclaration [SourceType] |
UnsupportedRoleDeclaration |
RoleDeclarationArityMismatch (ProperName 'TypeName) Int Int |
DuplicateRoleDeclaration (ProperName 'TypeName) |
CannotDeriveInvalidConstructorArg (Qualified (ProperName 'ClassName)) [Qualified (ProperName 'ClassName)] Bool |
CannotSkipTypeApplication SourceType |
CannotApplyExpressionOfTypeOnType SourceType SourceType |

#### Instances

Instances details

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

newtype MultipleErrors #

A stack trace for an error

Constructors

MultipleErrors |
Fields runMultipleErrors :: [ErrorMessage]

#### Instances

Instances details

Monoid MultipleErrors # |
Instance details Defined in Language.PureScript.Errors Methods mempty :: MultipleErrors # mappend :: MultipleErrors -> MultipleErrors -> MultipleErrors # mconcat :: [MultipleErrors] -> MultipleErrors #
Semigroup MultipleErrors # |
Instance details Defined in Language.PureScript.Errors Methods (<>) :: MultipleErrors -> MultipleErrors -> MultipleErrors # sconcat :: NonEmpty MultipleErrors -> MultipleErrors # stimes :: Integral b => b -> MultipleErrors -> MultipleErrors #
Show MultipleErrors # |
Instance details Defined in Language.PureScript.Errors Methods showsPrec :: Int -> MultipleErrors -> ShowS # show :: MultipleErrors -> String # showList :: [MultipleErrors] -> ShowS #
MonadError MultipleErrors Make # |
Instance details Defined in Language.PureScript.Make.Monad Methods throwError :: MultipleErrors -> Make a # catchError :: Make a -> (MultipleErrors -> Make a) -> Make a #
MonadWriter MultipleErrors Make |
Instance details Defined in Language.PureScript.Make.Monad Methods writer :: (a, MultipleErrors) -> Make a tell :: MultipleErrors -> Make () listen :: Make a -> Make (a, MultipleErrors) pass :: Make (a, MultipleErrors -> MultipleErrors) -> Make a

data CodegenTarget #

Constructors

JS |
JSSourceMap |
CoreFn |
Docs |

#### Instances

Instances details

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

data InternalIdentData #

This type is meant to be extended with any new uses for idents that come along. Adding constructors to this type is cheaper than adding them to `Ident` because functions that match on `Ident` can ignore all `InternalIdent`s with a single pattern, and thus don't have to change if a new `InternalIdentData` constructor is created.

Constructors

RuntimeLazyFactory |
Lazy !Text |

#### Instances

Instances details

FromJSON InternalIdentData # |
Instance details Defined in Language.PureScript.Names Methods parseJSON :: Value -> Parser InternalIdentData # parseJSONList :: Value -> Parser [InternalIdentData] # omittedField :: Maybe InternalIdentData #
ToJSON InternalIdentData # |
Instance details Defined in Language.PureScript.Names Methods toJSON :: InternalIdentData -> Value # toEncoding :: InternalIdentData -> Encoding # toJSONList :: [InternalIdentData] -> Value # toEncodingList :: [InternalIdentData] -> Encoding # omitField :: InternalIdentData -> Bool #
Generic InternalIdentData # |
Instance details Defined in Language.PureScript.Names Associated Types type Rep InternalIdentData :: Type -> Type # Methods from :: InternalIdentData -> Rep InternalIdentData x # to :: Rep InternalIdentData x -> InternalIdentData #
Show InternalIdentData # |
Instance details Defined in Language.PureScript.Names Methods showsPrec :: Int -> InternalIdentData -> ShowS # show :: InternalIdentData -> String # showList :: [InternalIdentData] -> ShowS #
NFData InternalIdentData # |
Instance details Defined in Language.PureScript.Names Methods rnf :: InternalIdentData -> () #
Eq InternalIdentData # |
Instance details Defined in Language.PureScript.Names Methods (==) :: InternalIdentData -> InternalIdentData -> Bool # (/=) :: InternalIdentData -> InternalIdentData -> Bool #
Ord InternalIdentData # |
Instance details Defined in Language.PureScript.Names Methods compare :: InternalIdentData -> InternalIdentData -> Ordering # (<) :: InternalIdentData -> InternalIdentData -> Bool # (<=) :: InternalIdentData -> InternalIdentData -> Bool # (>) :: InternalIdentData -> InternalIdentData -> Bool # (>=) :: InternalIdentData -> InternalIdentData -> Bool # max :: InternalIdentData -> InternalIdentData -> InternalIdentData # min :: InternalIdentData -> InternalIdentData -> InternalIdentData #
Serialise InternalIdentData # |
Instance details Defined in Language.PureScript.Names Methods encode :: InternalIdentData -> Encoding # decode :: Decoder s InternalIdentData # encodeList :: [InternalIdentData] -> Encoding # decodeList :: Decoder s [InternalIdentData] #
type Rep InternalIdentData # |
Instance details Defined in Language.PureScript.Names type Rep InternalIdentData = D1 ('MetaData "InternalIdentData" "Language.PureScript.Names" "purescript-0.15.12-5l1zT9m1jq0GgrLEUvYibC" 'False) (C1 ('MetaCons "RuntimeLazyFactory" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Lazy" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)))

data RebracketCaller #

Indicates whether the `rebracketModule` is being called with the full desugar pass run via `purs compile` or whether only the partial desugar pass is run via `purs docs`. This indication is needed to prevent a `purs docs` error when using `case _ of` syntax in a type class instance.

Constructors

CalledByCompile |
CalledByDocs |

#### Instances

Instances details

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

type PrettyPrintConstraint = (Qualified (ProperName 'ClassName), [PrettyPrintType], [PrettyPrintType]) #

data PrettyPrintType #

Constructors

PPTUnknown Int |
PPTypeVar Text (Maybe Text) |
PPTypeLevelString PSString |
PPTypeLevelInt Integer |
PPTypeWildcard (Maybe Text) |
PPTypeConstructor (Qualified (ProperName 'TypeName)) |
PPTypeOp (Qualified (OpName 'TypeOpName)) |
PPSkolem Text Int |
PPTypeApp PrettyPrintType PrettyPrintType |
PPKindArg PrettyPrintType |
PPConstrainedType PrettyPrintConstraint PrettyPrintType |
PPKindedType PrettyPrintType PrettyPrintType |
PPBinaryNoParensType PrettyPrintType PrettyPrintType PrettyPrintType |
PPParensInType PrettyPrintType |
PPForAll [(TypeVarVisibility, Text, Maybe PrettyPrintType)] PrettyPrintType |
PPFunction PrettyPrintType PrettyPrintType |
PPRecord [(Label, PrettyPrintType)] (Maybe PrettyPrintType) |
PPRow [(Label, PrettyPrintType)] (Maybe PrettyPrintType) |
PPTruncated |

data TypeVarVisibility #

Constructors

TypeVarVisible |
TypeVarInvisible |

#### Instances

Instances details

FromJSON TypeVarVisibility # |
Instance details Defined in Language.PureScript.Types Methods parseJSON :: Value -> Parser TypeVarVisibility # parseJSONList :: Value -> Parser [TypeVarVisibility] # omittedField :: Maybe TypeVarVisibility #
ToJSON TypeVarVisibility # |
Instance details Defined in Language.PureScript.Types Methods toJSON :: TypeVarVisibility -> Value # toEncoding :: TypeVarVisibility -> Encoding # toJSONList :: [TypeVarVisibility] -> Value # toEncodingList :: [TypeVarVisibility] -> Encoding # omitField :: TypeVarVisibility -> Bool #
Generic TypeVarVisibility # |
Instance details Defined in Language.PureScript.Types Associated Types type Rep TypeVarVisibility :: Type -> Type # Methods from :: TypeVarVisibility -> Rep TypeVarVisibility x # to :: Rep TypeVarVisibility x -> TypeVarVisibility #
Show TypeVarVisibility # |
Instance details Defined in Language.PureScript.Types Methods showsPrec :: Int -> TypeVarVisibility -> ShowS # show :: TypeVarVisibility -> String # showList :: [TypeVarVisibility] -> ShowS #
NFData TypeVarVisibility # |
Instance details Defined in Language.PureScript.Types Methods rnf :: TypeVarVisibility -> () #
Eq TypeVarVisibility # |
Instance details Defined in Language.PureScript.Types Methods (==) :: TypeVarVisibility -> TypeVarVisibility -> Bool # (/=) :: TypeVarVisibility -> TypeVarVisibility -> Bool #
Ord TypeVarVisibility # |
Instance details Defined in Language.PureScript.Types Methods compare :: TypeVarVisibility -> TypeVarVisibility -> Ordering # (<) :: TypeVarVisibility -> TypeVarVisibility -> Bool # (<=) :: TypeVarVisibility -> TypeVarVisibility -> Bool # (>) :: TypeVarVisibility -> TypeVarVisibility -> Bool # (>=) :: TypeVarVisibility -> TypeVarVisibility -> Bool # max :: TypeVarVisibility -> TypeVarVisibility -> TypeVarVisibility # min :: TypeVarVisibility -> TypeVarVisibility -> TypeVarVisibility #
Serialise TypeVarVisibility # |
Instance details Defined in Language.PureScript.Types Methods encode :: TypeVarVisibility -> Encoding # decode :: Decoder s TypeVarVisibility # encodeList :: [TypeVarVisibility] -> Encoding # decodeList :: Decoder s [TypeVarVisibility] #
type Rep TypeVarVisibility # |
Instance details Defined in Language.PureScript.Types type Rep TypeVarVisibility = D1 ('MetaData "TypeVarVisibility" "Language.PureScript.Types" "purescript-0.15.12-5l1zT9m1jq0GgrLEUvYibC" 'False) (C1 ('MetaCons "TypeVarVisible" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TypeVarInvisible" 'PrefixI 'False) (U1 :: Type -> Type))

data ConstraintData #

Additional data relevant to type class constraints

Constructors

PartialConstraintData [[Text]] Bool | Data to accompany a Partial constraint generated by the exhaustivity checker. It contains (rendered) binder information for those binders which were not matched, and a flag indicating whether the list was truncated or not. Note: we use `Text` here because using `Binder` would introduce a cyclic dependency in the module graph.

#### Instances

Instances details

FromJSON ConstraintData # |
Instance details Defined in Language.PureScript.Types Methods parseJSON :: Value -> Parser ConstraintData # parseJSONList :: Value -> Parser [ConstraintData] # omittedField :: Maybe ConstraintData #
ToJSON ConstraintData # |
Instance details Defined in Language.PureScript.Types Methods toJSON :: ConstraintData -> Value # toEncoding :: ConstraintData -> Encoding # toJSONList :: [ConstraintData] -> Value # toEncodingList :: [ConstraintData] -> Encoding # omitField :: ConstraintData -> Bool #
Generic ConstraintData # |
Instance details Defined in Language.PureScript.Types Associated Types type Rep ConstraintData :: Type -> Type # Methods from :: ConstraintData -> Rep ConstraintData x # to :: Rep ConstraintData x -> ConstraintData #
Show ConstraintData # |
Instance details Defined in Language.PureScript.Types Methods showsPrec :: Int -> ConstraintData -> ShowS # show :: ConstraintData -> String # showList :: [ConstraintData] -> ShowS #
NFData ConstraintData # |
Instance details Defined in Language.PureScript.Types Methods rnf :: ConstraintData -> () #
Eq ConstraintData # |
Instance details Defined in Language.PureScript.Types Methods (==) :: ConstraintData -> ConstraintData -> Bool # (/=) :: ConstraintData -> ConstraintData -> Bool #
Ord ConstraintData # |
Instance details Defined in Language.PureScript.Types Methods compare :: ConstraintData -> ConstraintData -> Ordering # (<) :: ConstraintData -> ConstraintData -> Bool # (<=) :: ConstraintData -> ConstraintData -> Bool # (>) :: ConstraintData -> ConstraintData -> Bool # (>=) :: ConstraintData -> ConstraintData -> Bool # max :: ConstraintData -> ConstraintData -> ConstraintData # min :: ConstraintData -> ConstraintData -> ConstraintData #
Serialise ConstraintData # |
Instance details Defined in Language.PureScript.Types Methods encode :: ConstraintData -> Encoding # decode :: Decoder s ConstraintData # encodeList :: [ConstraintData] -> Encoding # decodeList :: Decoder s [ConstraintData] #
type Rep ConstraintData # |
Instance details Defined in Language.PureScript.Types type Rep ConstraintData = D1 ('MetaData "ConstraintData" "Language.PureScript.Types" "purescript-0.15.12-5l1zT9m1jq0GgrLEUvYibC" 'False) (C1 ('MetaCons "PartialConstraintData" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [[Text]]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))

data RowListItem a #

Constructors

RowListItem |
Fields rowListAnn :: a rowListLabel :: Label rowListType :: Type a

#### Instances

Instances details

Foldable RowListItem # |
Instance details Defined in Language.PureScript.Types Methods fold :: Monoid m => RowListItem m -> m # foldMap :: Monoid m => (a -> m) -> RowListItem a -> m # foldMap' :: Monoid m => (a -> m) -> RowListItem a -> m foldr :: (a -> b -> b) -> b -> RowListItem a -> b # foldr' :: (a -> b -> b) -> b -> RowListItem a -> b # foldl :: (b -> a -> b) -> b -> RowListItem a -> b # foldl' :: (b -> a -> b) -> b -> RowListItem a -> b # foldr1 :: (a -> a -> a) -> RowListItem a -> a # foldl1 :: (a -> a -> a) -> RowListItem a -> a # toList :: RowListItem a -> [a] # null :: RowListItem a -> Bool # length :: RowListItem a -> Int # elem :: Eq a => a -> RowListItem a -> Bool # maximum :: Ord a => RowListItem a -> a # minimum :: Ord a => RowListItem a -> a # sum :: Num a => RowListItem a -> a # product :: Num a => RowListItem a -> a #
Traversable RowListItem # |
Instance details Defined in Language.PureScript.Types Methods traverse :: Applicative f => (a -> f b) -> RowListItem a -> f (RowListItem b) # sequenceA :: Applicative f => RowListItem (f a) -> f (RowListItem a) mapM :: Monad m => (a -> m b) -> RowListItem a -> m (RowListItem b) sequence :: Monad m => RowListItem (m a) -> m (RowListItem a)
Functor RowListItem # |
Instance details Defined in Language.PureScript.Types Methods fmap :: (a -> b) -> RowListItem a -> RowListItem b # (<$) :: a -> RowListItem b -> RowListItem a #
Generic (RowListItem a) # |
Instance details Defined in Language.PureScript.Types Associated Types type Rep (RowListItem a) :: Type -> Type # Methods from :: RowListItem a -> Rep (RowListItem a) x # to :: Rep (RowListItem a) x -> RowListItem a #
Show a => Show (RowListItem a) # |
Instance details Defined in Language.PureScript.Types Methods showsPrec :: Int -> RowListItem a -> ShowS # show :: RowListItem a -> String # showList :: [RowListItem a] -> ShowS #
type Rep (RowListItem a) # |
Instance details Defined in Language.PureScript.Types type Rep (RowListItem a) = D1 ('MetaData "RowListItem" "Language.PureScript.Types" "purescript-0.15.12-5l1zT9m1jq0GgrLEUvYibC" 'False) (C1 ('MetaCons "RowListItem" 'PrefixI 'True) (S1 ('MetaSel ('Just "rowListAnn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: (S1 ('MetaSel ('Just "rowListLabel") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Label) :*: S1 ('MetaSel ('Just "rowListType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type a)))))

data ExternsFile #

The data which will be serialized to an externs file

Constructors

ExternsFile |
Fields efVersion :: Text The externs version efModuleName :: ModuleName Module name efExports :: [DeclarationRef] List of module exports efImports :: [ExternsImport] List of module imports efFixities :: [ExternsFixity] List of operators and their fixities efTypeFixities :: [ExternsTypeFixity] List of type operators and their fixities efDeclarations :: [ExternsDeclaration] List of type and value declaration efSourceSpan :: SourceSpan Source span for error reporting

#### Instances

Instances details

Generic ExternsFile # |
Instance details Defined in Language.PureScript.Externs Associated Types type Rep ExternsFile :: Type -> Type # Methods from :: ExternsFile -> Rep ExternsFile x # to :: Rep ExternsFile x -> ExternsFile #
Show ExternsFile # |
Instance details Defined in Language.PureScript.Externs Methods showsPrec :: Int -> ExternsFile -> ShowS # show :: ExternsFile -> String # showList :: [ExternsFile] -> ShowS #
Serialise ExternsFile # |
Instance details Defined in Language.PureScript.Externs Methods encode :: ExternsFile -> Encoding # decode :: Decoder s ExternsFile # encodeList :: [ExternsFile] -> Encoding # decodeList :: Decoder s [ExternsFile] #
type Rep ExternsFile # |
Instance details Defined in Language.PureScript.Externs type Rep ExternsFile = D1 ('MetaData "ExternsFile" "Language.PureScript.Externs" "purescript-0.15.12-5l1zT9m1jq0GgrLEUvYibC" 'False) (C1 ('MetaCons "ExternsFile" 'PrefixI 'True) (((S1 ('MetaSel ('Just "efVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "efModuleName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ModuleName)) :*: (S1 ('MetaSel ('Just "efExports") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DeclarationRef]) :*: S1 ('MetaSel ('Just "efImports") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ExternsImport]))) :*: ((S1 ('MetaSel ('Just "efFixities") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ExternsFixity]) :*: S1 ('MetaSel ('Just "efTypeFixities") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ExternsTypeFixity])) :*: (S1 ('MetaSel ('Just "efDeclarations") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ExternsDeclaration]) :*: S1 ('MetaSel ('Just "efSourceSpan") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceSpan)))))

data ExternsImport #

A module import in an externs file

Constructors

ExternsImport |
Fields eiModule :: ModuleName The imported module eiImportType :: ImportDeclarationType The import type: regular, qualified or hiding eiImportedAs :: Maybe ModuleName The imported-as name, for qualified imports

#### Instances

Instances details

Generic ExternsImport # |
Instance details Defined in Language.PureScript.Externs Associated Types type Rep ExternsImport :: Type -> Type # Methods from :: ExternsImport -> Rep ExternsImport x # to :: Rep ExternsImport x -> ExternsImport #
Show ExternsImport # |
Instance details Defined in Language.PureScript.Externs Methods showsPrec :: Int -> ExternsImport -> ShowS # show :: ExternsImport -> String # showList :: [ExternsImport] -> ShowS #
Serialise ExternsImport # |
Instance details Defined in Language.PureScript.Externs Methods encode :: ExternsImport -> Encoding # decode :: Decoder s ExternsImport # encodeList :: [ExternsImport] -> Encoding # decodeList :: Decoder s [ExternsImport] #
type Rep ExternsImport # |
Instance details Defined in Language.PureScript.Externs type Rep ExternsImport = D1 ('MetaData "ExternsImport" "Language.PureScript.Externs" "purescript-0.15.12-5l1zT9m1jq0GgrLEUvYibC" 'False) (C1 ('MetaCons "ExternsImport" 'PrefixI 'True) (S1 ('MetaSel ('Just "eiModule") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ModuleName) :*: (S1 ('MetaSel ('Just "eiImportType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ImportDeclarationType) :*: S1 ('MetaSel ('Just "eiImportedAs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ModuleName)))))

data ExternsFixity #

A fixity declaration in an externs file

Constructors

ExternsFixity |
Fields efAssociativity :: Associativity The associativity of the operator efPrecedence :: Precedence The precedence level of the operator efOperator :: OpName 'ValueOpName The operator symbol efAlias :: Qualified (Either Ident (ProperName 'ConstructorName)) The value the operator is an alias for

#### Instances

Instances details

Generic ExternsFixity # |
Instance details Defined in Language.PureScript.Externs Associated Types type Rep ExternsFixity :: Type -> Type # Methods from :: ExternsFixity -> Rep ExternsFixity x # to :: Rep ExternsFixity x -> ExternsFixity #
Show ExternsFixity # |
Instance details Defined in Language.PureScript.Externs Methods showsPrec :: Int -> ExternsFixity -> ShowS # show :: ExternsFixity -> String # showList :: [ExternsFixity] -> ShowS #
Serialise ExternsFixity # |
Instance details Defined in Language.PureScript.Externs Methods encode :: ExternsFixity -> Encoding # decode :: Decoder s ExternsFixity # encodeList :: [ExternsFixity] -> Encoding # decodeList :: Decoder s [ExternsFixity] #
type Rep ExternsFixity # |
Instance details Defined in Language.PureScript.Externs type Rep ExternsFixity = D1 ('MetaData "ExternsFixity" "Language.PureScript.Externs" "purescript-0.15.12-5l1zT9m1jq0GgrLEUvYibC" 'False) (C1 ('MetaCons "ExternsFixity" 'PrefixI 'True) ((S1 ('MetaSel ('Just "efAssociativity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Associativity) :*: S1 ('MetaSel ('Just "efPrecedence") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Precedence)) :*: (S1 ('MetaSel ('Just "efOperator") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OpName 'ValueOpName)) :*: S1 ('MetaSel ('Just "efAlias") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Qualified (Either Ident (ProperName 'ConstructorName)))))))

data ExternsTypeFixity #

A type fixity declaration in an externs file

Constructors

ExternsTypeFixity |
Fields efTypeAssociativity :: Associativity The associativity of the operator efTypePrecedence :: Precedence The precedence level of the operator efTypeOperator :: OpName 'TypeOpName The operator symbol efTypeAlias :: Qualified (ProperName 'TypeName) The value the operator is an alias for

#### Instances

Instances details

Generic ExternsTypeFixity # |
Instance details Defined in Language.PureScript.Externs Associated Types type Rep ExternsTypeFixity :: Type -> Type # Methods from :: ExternsTypeFixity -> Rep ExternsTypeFixity x # to :: Rep ExternsTypeFixity x -> ExternsTypeFixity #
Show ExternsTypeFixity # |
Instance details Defined in Language.PureScript.Externs Methods showsPrec :: Int -> ExternsTypeFixity -> ShowS # show :: ExternsTypeFixity -> String # showList :: [ExternsTypeFixity] -> ShowS #
Serialise ExternsTypeFixity # |
Instance details Defined in Language.PureScript.Externs Methods encode :: ExternsTypeFixity -> Encoding # decode :: Decoder s ExternsTypeFixity # encodeList :: [ExternsTypeFixity] -> Encoding # decodeList :: Decoder s [ExternsTypeFixity] #
type Rep ExternsTypeFixity # |
Instance details Defined in Language.PureScript.Externs type Rep ExternsTypeFixity = D1 ('MetaData "ExternsTypeFixity" "Language.PureScript.Externs" "purescript-0.15.12-5l1zT9m1jq0GgrLEUvYibC" 'False) (C1 ('MetaCons "ExternsTypeFixity" 'PrefixI 'True) ((S1 ('MetaSel ('Just "efTypeAssociativity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Associativity) :*: S1 ('MetaSel ('Just "efTypePrecedence") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Precedence)) :*: (S1 ('MetaSel ('Just "efTypeOperator") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OpName 'TypeOpName)) :*: S1 ('MetaSel ('Just "efTypeAlias") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Qualified (ProperName 'TypeName))))))

data ExternsDeclaration #

A type or value declaration appearing in an externs file

Constructors

EDType | A type declaration
Fields edTypeName :: ProperName 'TypeName edTypeKind :: SourceType edTypeDeclarationKind :: TypeKind
EDTypeSynonym | A type synonym
Fields edTypeSynonymName :: ProperName 'TypeName edTypeSynonymArguments :: [(Text, Maybe SourceType)] edTypeSynonymType :: SourceType
EDDataConstructor | A data constructor
Fields edDataCtorName :: ProperName 'ConstructorName edDataCtorOrigin :: DataDeclType edDataCtorTypeCtor :: ProperName 'TypeName edDataCtorType :: SourceType edDataCtorFields :: [Ident]
EDValue | A value declaration
Fields edValueName :: Ident edValueType :: SourceType
EDClass | A type class declaration
Fields edClassName :: ProperName 'ClassName edClassTypeArguments :: [(Text, Maybe SourceType)] edClassMembers :: [(Ident, SourceType)] edClassConstraints :: [SourceConstraint] edFunctionalDependencies :: [FunctionalDependency] edIsEmpty :: Bool
EDInstance | An instance declaration
Fields edInstanceClassName :: Qualified (ProperName 'ClassName) edInstanceName :: Ident edInstanceForAll :: [(Text, SourceType)] edInstanceKinds :: [SourceType] edInstanceTypes :: [SourceType] edInstanceConstraints :: Maybe [SourceConstraint] edInstanceChain :: Maybe ChainId edInstanceChainIndex :: Integer edInstanceNameSource :: NameSource edInstanceSourceSpan :: SourceSpan

#### Instances

Instances details

Generic ExternsDeclaration # |
Instance details Defined in Language.PureScript.Externs Associated Types type Rep ExternsDeclaration :: Type -> Type # Methods from :: ExternsDeclaration -> Rep ExternsDeclaration x # to :: Rep ExternsDeclaration x -> ExternsDeclaration #
Show ExternsDeclaration # |
Instance details Defined in Language.PureScript.Externs Methods showsPrec :: Int -> ExternsDeclaration -> ShowS # show :: ExternsDeclaration -> String # showList :: [ExternsDeclaration] -> ShowS #
Serialise ExternsDeclaration # |
Instance details Defined in Language.PureScript.Externs Methods encode :: ExternsDeclaration -> Encoding # decode :: Decoder s ExternsDeclaration # encodeList :: [ExternsDeclaration] -> Encoding # decodeList :: Decoder s [ExternsDeclaration] #
type Rep ExternsDeclaration # |
Instance details Defined in Language.PureScript.Externs type Rep ExternsDeclaration = D1 ('MetaData "ExternsDeclaration" "Language.PureScript.Externs" "purescript-0.15.12-5l1zT9m1jq0GgrLEUvYibC" 'False) ((C1 ('MetaCons "EDType" 'PrefixI 'True) (S1 ('MetaSel ('Just "edTypeName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ProperName 'TypeName)) :*: (S1 ('MetaSel ('Just "edTypeKind") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceType) :*: S1 ('MetaSel ('Just "edTypeDeclarationKind") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TypeKind))) :+: (C1 ('MetaCons "EDTypeSynonym" 'PrefixI 'True) (S1 ('MetaSel ('Just "edTypeSynonymName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ProperName 'TypeName)) :*: (S1 ('MetaSel ('Just "edTypeSynonymArguments") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Text, Maybe SourceType)]) :*: S1 ('MetaSel ('Just "edTypeSynonymType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceType))) :+: C1 ('MetaCons "EDDataConstructor" 'PrefixI 'True) ((S1 ('MetaSel ('Just "edDataCtorName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ProperName 'ConstructorName)) :*: S1 ('MetaSel ('Just "edDataCtorOrigin") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DataDeclType)) :*: (S1 ('MetaSel ('Just "edDataCtorTypeCtor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ProperName 'TypeName)) :*: (S1 ('MetaSel ('Just "edDataCtorType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceType) :*: S1 ('MetaSel ('Just "edDataCtorFields") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Ident])))))) :+: (C1 ('MetaCons "EDValue" 'PrefixI 'True) (S1 ('MetaSel ('Just "edValueName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ident) :*: S1 ('MetaSel ('Just "edValueType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceType)) :+: (C1 ('MetaCons "EDClass" 'PrefixI 'True) ((S1 ('MetaSel ('Just "edClassName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ProperName 'ClassName)) :*: (S1 ('MetaSel ('Just "edClassTypeArguments") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Text, Maybe SourceType)]) :*: S1 ('MetaSel ('Just "edClassMembers") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Ident, SourceType)]))) :*: (S1 ('MetaSel ('Just "edClassConstraints") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [SourceConstraint]) :*: (S1 ('MetaSel ('Just "edFunctionalDependencies") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [FunctionalDependency]) :*: S1 ('MetaSel ('Just "edIsEmpty") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))) :+: C1 ('MetaCons "EDInstance" 'PrefixI 'True) (((S1 ('MetaSel ('Just "edInstanceClassName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Qualified (ProperName 'ClassName))) :*: S1 ('MetaSel ('Just "edInstanceName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ident)) :*: (S1 ('MetaSel ('Just "edInstanceForAll") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Text, SourceType)]) :*: (S1 ('MetaSel ('Just "edInstanceKinds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [SourceType]) :*: S1 ('MetaSel ('Just "edInstanceTypes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [SourceType])))) :*: ((S1 ('MetaSel ('Just "edInstanceConstraints") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [SourceConstraint])) :*: S1 ('MetaSel ('Just "edInstanceChain") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ChainId))) :*: (S1 ('MetaSel ('Just "edInstanceChainIndex") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer) :*: (S1 ('MetaSel ('Just "edInstanceNameSource") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NameSource) :*: S1 ('MetaSel ('Just "edInstanceSourceSpan") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceSpan))))))))

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 #
Generic ImportDeclarationType # |
Instance details Defined in Language.PureScript.AST.Declarations Associated Types type Rep ImportDeclarationType :: Type -> Type # 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.12-5l1zT9m1jq0GgrLEUvYibC" '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]))))

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 #
Generic NameSource # |
Instance details Defined in Language.PureScript.AST.Declarations Associated Types type Rep NameSource :: 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 #
NFData NameSource # |
Instance details Defined in Language.PureScript.AST.Declarations Methods rnf :: NameSource -> () #
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.12-5l1zT9m1jq0GgrLEUvYibC" 'False) (C1 ('MetaCons "UserNamed" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CompilerNamed" 'PrefixI 'False) (U1 :: Type -> Type))

type Precedence = Integer #

A precedence level for an infix operator

data NameVisibility #

The visibility of a name in scope

Constructors

Undefined | The name is defined in the current binding group, but is not visible
Defined | The name is defined in the another binding group, or has been made visible by a function binder

#### Instances

Instances details

Generic NameVisibility # |
Instance details Defined in Language.PureScript.Environment Associated Types type Rep NameVisibility :: Type -> Type # Methods from :: NameVisibility -> Rep NameVisibility x # to :: Rep NameVisibility x -> NameVisibility #
Show NameVisibility # |
Instance details Defined in Language.PureScript.Environment Methods showsPrec :: Int -> NameVisibility -> ShowS # show :: NameVisibility -> String # showList :: [NameVisibility] -> ShowS #
NFData NameVisibility # |
Instance details Defined in Language.PureScript.Environment Methods rnf :: NameVisibility -> () #
Eq NameVisibility # |
Instance details Defined in Language.PureScript.Environment Methods (==) :: NameVisibility -> NameVisibility -> Bool # (/=) :: NameVisibility -> NameVisibility -> Bool #
Serialise NameVisibility # |
Instance details Defined in Language.PureScript.Environment Methods encode :: NameVisibility -> Encoding # decode :: Decoder s NameVisibility # encodeList :: [NameVisibility] -> Encoding # decodeList :: Decoder s [NameVisibility] #
type Rep NameVisibility # |
Instance details Defined in Language.PureScript.Environment type Rep NameVisibility = D1 ('MetaData "NameVisibility" "Language.PureScript.Environment" "purescript-0.15.12-5l1zT9m1jq0GgrLEUvYibC" 'False) (C1 ('MetaCons "Undefined" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Defined" 'PrefixI 'False) (U1 :: Type -> Type))

data TypeClassData #

Information about a type class

Constructors

TypeClassData |
Fields typeClassArguments :: [(Text, Maybe SourceType)] A list of type argument names, and their kinds, where kind annotations were provided. typeClassMembers :: [(Ident, SourceType)] A list of type class members and their types. Type arguments listed above are considered bound in these types. typeClassSuperclasses :: [SourceConstraint] A list of superclasses of this type class. Type arguments listed above are considered bound in the types appearing in these constraints. typeClassDependencies :: [FunctionalDependency] A list of functional dependencies for the type arguments of this class. typeClassDeterminedArguments :: Set Int A set of indexes of type argument that are fully determined by other arguments via functional dependencies. This can be computed from both typeClassArguments and typeClassDependencies. typeClassCoveringSets :: Set (Set Int) A sets of arguments that can be used to infer all other arguments. typeClassIsEmpty :: Bool Whether or not dictionaries for this type class are necessarily empty.

#### Instances

Instances details

Generic TypeClassData # |
Instance details Defined in Language.PureScript.Environment Associated Types type Rep TypeClassData :: Type -> Type # Methods from :: TypeClassData -> Rep TypeClassData x # to :: Rep TypeClassData x -> TypeClassData #
Show TypeClassData # |
Instance details Defined in Language.PureScript.Environment Methods showsPrec :: Int -> TypeClassData -> ShowS # show :: TypeClassData -> String # showList :: [TypeClassData] -> ShowS #
NFData TypeClassData # |
Instance details Defined in Language.PureScript.Environment Methods rnf :: TypeClassData -> () #
type Rep TypeClassData # |
Instance details Defined in Language.PureScript.Environment type Rep TypeClassData = D1 ('MetaData "TypeClassData" "Language.PureScript.Environment" "purescript-0.15.12-5l1zT9m1jq0GgrLEUvYibC" 'False) (C1 ('MetaCons "TypeClassData" 'PrefixI 'True) ((S1 ('MetaSel ('Just "typeClassArguments") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Text, Maybe SourceType)]) :*: (S1 ('MetaSel ('Just "typeClassMembers") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Ident, SourceType)]) :*: S1 ('MetaSel ('Just "typeClassSuperclasses") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [SourceConstraint]))) :*: ((S1 ('MetaSel ('Just "typeClassDependencies") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [FunctionalDependency]) :*: S1 ('MetaSel ('Just "typeClassDeterminedArguments") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Set Int))) :*: (S1 ('MetaSel ('Just "typeClassCoveringSets") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Set (Set Int))) :*: S1 ('MetaSel ('Just "typeClassIsEmpty") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))))

data TypeKind #

The kinds of a type

Constructors

DataType DataDeclType [(Text, Maybe SourceType, Role)] [(ProperName 'ConstructorName, [SourceType])] | Data type
TypeSynonym | Type synonym
ExternData [Role] | Foreign data
LocalTypeVariable | A local type variable
ScopedTypeVar | A scoped type variable

#### Instances

Instances details

Generic TypeKind # |
Instance details Defined in Language.PureScript.Environment Associated Types type Rep TypeKind :: Type -> Type # Methods from :: TypeKind -> Rep TypeKind x # to :: Rep TypeKind x -> TypeKind #
Show TypeKind # |
Instance details Defined in Language.PureScript.Environment Methods showsPrec :: Int -> TypeKind -> ShowS # show :: TypeKind -> String # showList :: [TypeKind] -> ShowS #
NFData TypeKind # |
Instance details Defined in Language.PureScript.Environment Methods rnf :: TypeKind -> () #
Eq TypeKind # |
Instance details Defined in Language.PureScript.Environment Methods (==) :: TypeKind -> TypeKind -> Bool # (/=) :: TypeKind -> TypeKind -> Bool #
Serialise TypeKind # |
Instance details Defined in Language.PureScript.Environment Methods encode :: TypeKind -> Encoding # decode :: Decoder s TypeKind # encodeList :: [TypeKind] -> Encoding # decodeList :: Decoder s [TypeKind] #
type Rep TypeKind # |
Instance details Defined in Language.PureScript.Environment type Rep TypeKind = D1 ('MetaData "TypeKind" "Language.PureScript.Environment" "purescript-0.15.12-5l1zT9m1jq0GgrLEUvYibC" 'False) ((C1 ('MetaCons "DataType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DataDeclType) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Text, Maybe SourceType, Role)]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(ProperName 'ConstructorName, [SourceType])]))) :+: C1 ('MetaCons "TypeSynonym" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ExternData" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Role])) :+: (C1 ('MetaCons "LocalTypeVariable" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ScopedTypeVar" 'PrefixI 'False) (U1 :: Type -> Type))))

data Imports #

The imported declarations for a module, including the module's own members.

Constructors

Imports |
Fields importedTypes :: ImportMap (ProperName 'TypeName) Local names for types within a module mapped to their qualified names importedTypeOps :: ImportMap (OpName 'TypeOpName) Local names for type operators within a module mapped to their qualified names importedDataConstructors :: ImportMap (ProperName 'ConstructorName) Local names for data constructors within a module mapped to their qualified names importedTypeClasses :: ImportMap (ProperName 'ClassName) Local names for classes within a module mapped to their qualified names importedValues :: ImportMap Ident Local names for values within a module mapped to their qualified names importedValueOps :: ImportMap (OpName 'ValueOpName) Local names for value operators within a module mapped to their qualified names importedModules :: Set ModuleName The name of modules that have been imported into the current scope that can be re-exported. If a module is imported with `as` qualification, the `as` name appears here, otherwise the original name. importedQualModules :: Set ModuleName The "as" names of modules that have been imported qualified. importedKinds :: ImportMap (ProperName 'TypeName) Local names for kinds within a module mapped to their qualified names

#### Instances

Instances details

Show Imports # |
Instance details Defined in Language.PureScript.Sugar.Names.Env Methods showsPrec :: Int -> Imports -> ShowS # show :: Imports -> String # showList :: [Imports] -> ShowS #

type UsedImports = Map ModuleName [Qualified Name] #

Map of module name to list of imported names from that module which have been used.

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 #
Generic ExportSource # |
Instance details Defined in Language.PureScript.AST.Declarations Associated Types type Rep ExportSource :: Type -> Type # 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 #
NFData ExportSource # |
Instance details Defined in Language.PureScript.AST.Declarations Methods rnf :: ExportSource -> () #
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.12-5l1zT9m1jq0GgrLEUvYibC" 'False) (C1 ('MetaCons "ExportSource" 'PrefixI 'True) (S1 ('MetaSel ('Just "exportSourceImportedFrom") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ModuleName)) :*: S1 ('MetaSel ('Just "exportSourceDefinedIn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ModuleName)))

data Exports #

The exported declarations from a module.

Constructors

Exports |
Fields exportedTypes :: Map (ProperName 'TypeName) ([ProperName 'ConstructorName], ExportSource) The exported types along with the module they originally came from. exportedTypeOps :: Map (OpName 'TypeOpName) ExportSource The exported type operators along with the module they originally came from. exportedTypeClasses :: Map (ProperName 'ClassName) ExportSource The exported classes along with the module they originally came from. exportedValues :: Map Ident ExportSource The exported values along with the module they originally came from. exportedValueOps :: Map (OpName 'ValueOpName) ExportSource The exported value operators along with the module they originally came from.

#### Instances

Instances details

Show Exports # |
Instance details Defined in Language.PureScript.Sugar.Names.Env Methods showsPrec :: Int -> Exports -> ShowS # show :: Exports -> String # showList :: [Exports] -> ShowS #

data ImportRecord a #

The details for an import: the name of the thing that is being imported (`x` if importing from `A`), the module that the thing was originally defined in (for re-export resolution), and the import provenance (see below).

Constructors

ImportRecord |
Fields importName :: Qualified a importSourceModule :: ModuleName importSourceSpan :: SourceSpan importProvenance :: ImportProvenance

#### Instances

Instances details

Show a => Show (ImportRecord a) # |
Instance details Defined in Language.PureScript.Sugar.Names.Env Methods showsPrec :: Int -> ImportRecord a -> ShowS # show :: ImportRecord a -> String # showList :: [ImportRecord a] -> ShowS #
Eq a => Eq (ImportRecord a) # |
Instance details Defined in Language.PureScript.Sugar.Names.Env Methods (==) :: ImportRecord a -> ImportRecord a -> Bool # (/=) :: ImportRecord a -> ImportRecord a -> Bool #
Ord a => Ord (ImportRecord a) # |
Instance details Defined in Language.PureScript.Sugar.Names.Env Methods compare :: ImportRecord a -> ImportRecord a -> Ordering # (<) :: ImportRecord a -> ImportRecord a -> Bool # (<=) :: ImportRecord a -> ImportRecord a -> Bool # (>) :: ImportRecord a -> ImportRecord a -> Bool # (>=) :: ImportRecord a -> ImportRecord a -> Bool # max :: ImportRecord a -> ImportRecord a -> ImportRecord a # min :: ImportRecord a -> ImportRecord a -> ImportRecord a #

data WildcardData #

Describes how a TypeWildcard should be presented to the user during type checking: holes (?foo) are always emitted as errors, whereas unnamed wildcards (_) default to warnings, but are ignored entirely if they are contained by a binding with a complete (wildcard-free) type signature.

Constructors

HoleWildcard Text |
UnnamedWildcard |
IgnoredWildcard |

#### Instances

Instances details

FromJSON WildcardData # |
Instance details Defined in Language.PureScript.Types Methods parseJSON :: Value -> Parser WildcardData # parseJSONList :: Value -> Parser [WildcardData] # omittedField :: Maybe WildcardData #
ToJSON WildcardData # |
Instance details Defined in Language.PureScript.Types Methods toJSON :: WildcardData -> Value # toEncoding :: WildcardData -> Encoding # toJSONList :: [WildcardData] -> Value # toEncodingList :: [WildcardData] -> Encoding # omitField :: WildcardData -> Bool #
Generic WildcardData # |
Instance details Defined in Language.PureScript.Types Associated Types type Rep WildcardData :: Type -> Type # Methods from :: WildcardData -> Rep WildcardData x # to :: Rep WildcardData x -> WildcardData #
Show WildcardData # |
Instance details Defined in Language.PureScript.Types Methods showsPrec :: Int -> WildcardData -> ShowS # show :: WildcardData -> String # showList :: [WildcardData] -> ShowS #
NFData WildcardData # |
Instance details Defined in Language.PureScript.Types Methods rnf :: WildcardData -> () #
Eq WildcardData # |
Instance details Defined in Language.PureScript.Types Methods (==) :: WildcardData -> WildcardData -> Bool # (/=) :: WildcardData -> WildcardData -> Bool #
Ord WildcardData # |
Instance details Defined in Language.PureScript.Types Methods compare :: WildcardData -> WildcardData -> Ordering # (<) :: WildcardData -> WildcardData -> Bool # (<=) :: WildcardData -> WildcardData -> Bool # (>) :: WildcardData -> WildcardData -> Bool # (>=) :: WildcardData -> WildcardData -> Bool # max :: WildcardData -> WildcardData -> WildcardData # min :: WildcardData -> WildcardData -> WildcardData #
Serialise WildcardData # |
Instance details Defined in Language.PureScript.Types Methods encode :: WildcardData -> Encoding # decode :: Decoder s WildcardData # encodeList :: [WildcardData] -> Encoding # decodeList :: Decoder s [WildcardData] #
type Rep WildcardData # |
Instance details Defined in Language.PureScript.Types type Rep WildcardData = D1 ('MetaData "WildcardData" "Language.PureScript.Types" "purescript-0.15.12-5l1zT9m1jq0GgrLEUvYibC" 'False) (C1 ('MetaCons "HoleWildcard" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: (C1 ('MetaCons "UnnamedWildcard" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "IgnoredWildcard" 'PrefixI 'False) (U1 :: Type -> Type)))

data DependencyDepth #

Constructors

Direct |
Transitive |

data CheckState #

State required for type checking

Constructors

CheckState |
Fields checkEnv :: Environment The current `Environment` checkNextType :: Int The next type unification variable checkNextSkolem :: Int The next skolem variable checkNextSkolemScope :: Int The next skolem scope constant checkCurrentModule :: Maybe ModuleName The current module checkCurrentModuleImports :: [(SourceAnn, ModuleName, ImportDeclarationType, Maybe ModuleName, Map (ProperName 'TypeName) ([ProperName 'ConstructorName], ExportSource))] The current module imports and their exported types. Newtype constructors have to be in scope for some Coercible constraints to be solvable, so we need to know which constructors are imported and whether they are actually defined in or re-exported from the imported modules. checkSubstitution :: Substitution The current substitution checkHints :: [ErrorMessageHint] The current error message hint stack. This goes into state, rather than using `rethrow`, since this way, we can provide good error messages during instance resolution. checkConstructorImportsForCoercible :: Set (ModuleName, Qualified (ProperName 'ConstructorName)) Newtype constructors imports required to solve Coercible constraints. We have to keep track of them so that we don't emit unused import warnings.

data MakeActions m #

Actions that require implementations when running in "make" mode.

This type exists to make two things abstract:

- The particular backend being used (JavaScript, C++11, etc.)
- The details of how files are read/written etc.

Constructors

MakeActions |
Fields getInputTimestampsAndHashes :: ModuleName -> m (Either RebuildPolicy (Map FilePath (UTCTime, m ContentHash))) Get the timestamps and content hashes for the input files for a module. The content hash is returned as a monadic action so that the file does not have to be read if it's not necessary. getOutputTimestamp :: ModuleName -> m (Maybe UTCTime) Get the time this module was last compiled, provided that all of the requested codegen targets were also produced then. The defaultMakeActions implementation uses the modification time of the externs file, because the externs file is written first and we always write one. If there is no externs file, or if any of the requested codegen targets were not produced the last time this module was compiled, this function must return Nothing; this indicates that the module will have to be recompiled. readExterns :: ModuleName -> m (FilePath, Maybe ExternsFile) Read the externs file for a module as a string and also return the actual path for the file. codegen :: Module Ann -> Module -> ExternsFile -> SupplyT m () Run the code generator for the module and write any required output files. ffiCodegen :: Module Ann -> m () Check ffi and print it in the output directory. progress :: ProgressMessage -> m () Respond to a progress update. readCacheDb :: m CacheDb Read the cache database (which contains timestamps and hashes for input files) from some external source, e.g. a file on disk. writeCacheDb :: CacheDb -> m () Write the given cache database to some external source (e.g. a file on disk). writePackageJson :: m () Write to the output directory the package.json file allowing Node.js to load .js files as ES modules. outputPrimDocs :: m () If generating docs, output the documentation for the Prim modules

data RebuildPolicy #

Determines when to rebuild a module

Constructors

RebuildNever | Never rebuild this module
RebuildAlways | Always rebuild this module

#### Instances

Instances details

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

data ProgressMessage #

Progress messages from the make process

Constructors

CompilingModule ModuleName (Maybe (Int, Int)) | Compilation started for the specified module

#### Instances

Instances details

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

type ModuleGraph = [(ModuleName, [ModuleName])] #

A list of modules with their transitive dependencies

data ModuleSignature #

A module signature for sorting dependencies.

Constructors

ModuleSignature |
Fields sigSourceSpan :: SourceSpan sigModuleName :: ModuleName sigImports :: [(ModuleName, SourceSpan)]

newtype AssocList k t #

Constructors

AssocList |
Fields runAssocList :: [(k, t)]

#### Instances

Instances details

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)
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 #
(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 #

data PathNode t #

Constructors

Leaf t |
Branch (PathTree t) |

#### Instances

Instances details

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

newtype PathTree t #

Constructors

PathTree (AssocList PSString (PathNode t)) |

#### Instances

Instances details

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

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

data ImportProvenance #

Used to track how an import was introduced into scope. This allows us to handle the one-open-import special case that allows a name conflict to become a warning rather than being an unresolvable situation.

Constructors

FromImplicit |
FromExplicit |
Local |
Prim |

#### Instances

Instances details

Show ImportProvenance # |
Instance details Defined in Language.PureScript.Sugar.Names.Env Methods showsPrec :: Int -> ImportProvenance -> ShowS # show :: ImportProvenance -> String # showList :: [ImportProvenance] -> ShowS #
Eq ImportProvenance # |
Instance details Defined in Language.PureScript.Sugar.Names.Env Methods (==) :: ImportProvenance -> ImportProvenance -> Bool # (/=) :: ImportProvenance -> ImportProvenance -> Bool #
Ord ImportProvenance # |
Instance details Defined in Language.PureScript.Sugar.Names.Env Methods compare :: ImportProvenance -> ImportProvenance -> Ordering # (<) :: ImportProvenance -> ImportProvenance -> Bool # (<=) :: ImportProvenance -> ImportProvenance -> Bool # (>) :: ImportProvenance -> ImportProvenance -> Bool # (>=) :: ImportProvenance -> ImportProvenance -> Bool # max :: ImportProvenance -> ImportProvenance -> ImportProvenance # min :: ImportProvenance -> ImportProvenance -> ImportProvenance #

data KindSignatureFor #

What sort of declaration the kind signature applies to.

Constructors

DataSig |
NewtypeSig |
TypeSynonymSig |
ClassSig |

#### Instances

Instances details

Generic KindSignatureFor # |
Instance details Defined in Language.PureScript.AST.Declarations Associated Types type Rep KindSignatureFor :: 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 #
NFData KindSignatureFor # |
Instance details Defined in Language.PureScript.AST.Declarations Methods rnf :: KindSignatureFor -> () #
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.12-5l1zT9m1jq0GgrLEUvYibC" '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)))

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

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 #

data InstanceDerivationStrategy #

Constructors

KnownClassStrategy |
NewtypeStrategy |

#### Instances

Instances details

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

newtype UnkLevel #

Constructors

UnkLevel (NonEmpty Unknown) |

#### Instances

Instances details

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

newtype SkolemScope #

An identifier for the scope of a skolem variable

Constructors

SkolemScope |
Fields runSkolemScope :: Int

#### Instances

Instances details

FromJSON SkolemScope # |
Instance details Defined in Language.PureScript.Types Methods parseJSON :: Value -> Parser SkolemScope # parseJSONList :: Value -> Parser [SkolemScope] # omittedField :: Maybe SkolemScope #
ToJSON SkolemScope # |
Instance details Defined in Language.PureScript.Types Methods toJSON :: SkolemScope -> Value # toEncoding :: SkolemScope -> Encoding # toJSONList :: [SkolemScope] -> Value # toEncodingList :: [SkolemScope] -> Encoding # omitField :: SkolemScope -> Bool #
Generic SkolemScope # |
Instance details Defined in Language.PureScript.Types Associated Types type Rep SkolemScope :: Type -> Type # Methods from :: SkolemScope -> Rep SkolemScope x # to :: Rep SkolemScope x -> SkolemScope #
Show SkolemScope # |
Instance details Defined in Language.PureScript.Types Methods showsPrec :: Int -> SkolemScope -> ShowS # show :: SkolemScope -> String # showList :: [SkolemScope] -> ShowS #
NFData SkolemScope # |
Instance details Defined in Language.PureScript.Types Methods rnf :: SkolemScope -> () #
Eq SkolemScope # |
Instance details Defined in Language.PureScript.Types Methods (==) :: SkolemScope -> SkolemScope -> Bool # (/=) :: SkolemScope -> SkolemScope -> Bool #
Ord SkolemScope # |
Instance details Defined in Language.PureScript.Types Methods compare :: SkolemScope -> SkolemScope -> Ordering # (<) :: SkolemScope -> SkolemScope -> Bool # (<=) :: SkolemScope -> SkolemScope -> Bool # (>) :: SkolemScope -> SkolemScope -> Bool # (>=) :: SkolemScope -> SkolemScope -> Bool # max :: SkolemScope -> SkolemScope -> SkolemScope # min :: SkolemScope -> SkolemScope -> SkolemScope #
Serialise SkolemScope # |
Instance details Defined in Language.PureScript.Types Methods encode :: SkolemScope -> Encoding # decode :: Decoder s SkolemScope # encodeList :: [SkolemScope] -> Encoding # decodeList :: Decoder s [SkolemScope] #
type Rep SkolemScope # |
Instance details Defined in Language.PureScript.Types type Rep SkolemScope = D1 ('MetaData "SkolemScope" "Language.PureScript.Types" "purescript-0.15.12-5l1zT9m1jq0GgrLEUvYibC" 'True) (C1 ('MetaCons "SkolemScope" 'PrefixI 'True) (S1 ('MetaSel ('Just "runSkolemScope") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)))

type SynonymMap = Map (Qualified (ProperName 'TypeName)) ([(Text, Maybe SourceType)], SourceType) #

Type synonym information (arguments with kinds, aliased type), indexed by name

type KindMap = Map (Qualified (ProperName 'TypeName)) (SourceType, TypeKind) #

data BindingGroupType #

Constructors

RecursiveBindingGroup |
NonRecursiveBindingGroup |

#### Instances

Instances details

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

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

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

type Frontier = Map IntSet (First (IntMap (NonEmpty IntSet))) #

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 ValueFixity #

Constructors

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

#### Instances

Instances details

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 #

data TypeFixity #

Constructors

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

#### Instances

Instances details

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 #

data ScopedIdent #

Constructors

LocalIdent Ident |
ToplevelIdent Ident |

#### Instances

Instances details

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

newtype ErrorSuggestion #

Constructors

ErrorSuggestion Text |

data PPEOptions #

`prettyPrintSingleError` Options

Constructors

PPEOptions |
Fields ppeCodeColor :: Maybe (ColorIntensity, Color) Color code with this color... or not ppeFull :: Bool Should write a full error message? ppeLevel :: Level Should this report an error or a warning? ppeShowDocs :: Bool Should show a link to error message's doc page? ppeRelativeDirectory :: FilePath FilePath to which the errors are relative ppeFileContents :: [(FilePath, Text)] Unparsed contents of source files

pattern ByNullSourcePos :: QualifiedBy #

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

pattern MkUnguarded :: Expr -> GuardedExpr #

pattern NullSourceSpan :: SourceSpan #

pattern REmptyKinded :: forall a. a -> Maybe (Type a) -> Type a #

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

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

pattern NullSourceAnn :: SourceAnn #

function :: SourceType -> SourceType -> SourceType #

Smart constructor for function types

defaultOptions :: Options #

internalError :: HasCallStack => String -> a #

Exit with an error message and a crash report link.

renderBox :: Box -> String #

line :: Text -> Box #

errorMessage :: SimpleErrorMessage -> MultipleErrors #

Create an error set from a single simple error message

copyFile :: (MonadIO m, MonadError MultipleErrors m) => FilePath -> FilePath -> m () #

Copy a file in the `Make` monad, capturing any errors using the `MonadError` instance.

nonEmpty :: MultipleErrors -> Bool #

Check whether a collection of errors is empty or not.

toMaybeModuleName :: QualifiedBy -> Maybe ModuleName #

exportedDeclarations :: Module -> [Declaration] #

Return a list of all declarations which are exported from a module. This function descends into data declarations to filter out unexported data constructors, and also filters out type instance declarations if they refer to classes or types which are not themselves exported.

Note that this function assumes that the module has already had its imports desugared using `desugarImports`. It will produce incorrect results if this is not the case - for example, type class instances will be incorrectly removed in some cases.

The returned declarations are in the same order as they appear in the export list, unless there is no export list, in which case they appear in the same order as they do in the source file.

Kind signatures declarations are also exported if their associated declaration is exported.

isExported :: Maybe [DeclarationRef] -> Declaration -> Bool #

Test if a declaration is exported, given a module's export list. Note that this function does not account for type instance declarations of non-exported types, or non-exported data constructors. Therefore, you should prefer `exportedDeclarations` to this function, where possible.

declName :: Declaration -> Maybe Name #

declRefName :: DeclarationRef -> Name #

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

Recursively flatten data binding groups in the list of declarations

everythingOnTypes :: (r -> r -> r) -> (Type a -> r) -> Type a -> r #

coerceProperName :: ProperName a -> ProperName b #

Coerces a ProperName from one ProperNameType to another. This should be used with care, and is primarily used to convert ClassNames into TypeNames after classes have been desugared.

disqualify :: Qualified a -> a #

Remove the module name from a qualified name

isQualified :: Qualified a -> Bool #

Checks whether a qualified value is actually qualified with a module reference

isQualifiedWith :: ModuleName -> Qualified a -> Bool #

Checks whether a qualified value is qualified with a particular module

binderNames :: Binder -> [Ident] #

Collect all names introduced in binders in an expression

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

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

A traversal for TypeInstanceBody

mapConstraintArgs :: ([Type a] -> [Type a]) -> Constraint a -> Constraint a #

guardedExprM :: Applicative m => (Guard -> m Guard) -> (Expr -> m Expr) -> GuardedExpr -> m GuardedExpr #

nullSourceSpan :: SourceSpan #

byMaybeModuleName :: Maybe ModuleName -> QualifiedBy #

displayStartEndPos :: SourceSpan -> Text #

rethrow :: MonadError e m => (e -> e) -> m a -> m a #

Rethrow an error with a more detailed error message in the case of failure

errorMessage' :: SourceSpan -> SimpleErrorMessage -> MultipleErrors #

Create an error set from a single simple error message and source annotation

rethrowWithPosition :: MonadError MultipleErrors m => SourceSpan -> m a -> m a #

Rethrow an error with source position information

addHint :: ErrorMessageHint -> MultipleErrors -> MultipleErrors #

Add a hint to an error message

runIdent :: Ident -> Text #

runModuleName :: ModuleName -> Text #

showIdent :: Ident -> Text #

showQualified :: (a -> Text) -> Qualified a -> Text #

unusedIdent :: Text #

everywhereOnValues :: (Declaration -> Declaration) -> (Expr -> Expr) -> (Binder -> Binder) -> (Declaration -> Declaration, Expr -> Expr, Binder -> Binder) #

dictTypeName :: ProperName a -> ProperName a #

freshIdent :: MonadSupply m => Text -> m Ident #

everythingOnValues :: forall r. (r -> r -> r) -> (Declaration -> r) -> (Expr -> r) -> (Binder -> r) -> (CaseAlternative -> r) -> (DoNotationElement -> r) -> (Declaration -> r, Expr -> r, Binder -> r, CaseAlternative -> r, DoNotationElement -> r) #

isDictTypeName :: ProperName a -> Bool #

lookupConstructor :: Environment -> Qualified (ProperName 'ConstructorName) -> (DataDeclType, ProperName 'TypeName, SourceType, [Ident]) #

Finds information about data constructors from the current environment.

lookupValue :: Environment -> Qualified Ident -> Maybe (SourceType, NameKind, NameVisibility) #

Finds information about values from the current environment.

getQual :: Qualified a -> Maybe ModuleName #

evalSupplyT :: Functor m => Integer -> SupplyT m a -> m a #

convertPrettyPrintType :: Int -> Type a -> PrettyPrintType #

prettyPrintLabel :: Label -> Text #

displayRole :: Role -> Text #

typeVarVisibilityPrefix :: TypeVarVisibility -> Text #

prettyPrintString :: PSString -> Text #

Pretty print a PSString, using PureScript escape sequences.

moduleNameFromString :: Text -> ModuleName #

nullSourceAnn :: SourceAnn #

eqType :: Type a -> Type b -> Bool #

srcTypeConstructor :: Qualified (ProperName 'TypeName) -> SourceType #

prettyPrintBinderAtom :: Binder -> Text #

prettyPrintObjectKey :: PSString -> Text #

prettyPrintSuggestedType :: Type a -> String #

Generate a pretty-printed string representing a suggested `Type`

prettyPrintValue :: Int -> Expr -> Box #

Pretty-print an expression

typeAsBox :: Int -> Type a -> Box #

typeAtomAsBox :: Int -> Type a -> Box #

typeDiffAsBox :: Int -> Type a -> Box #

eraseForAllKindAnnotations :: Type a -> Type a #

eraseKindApps :: Type a -> Type a #

everywhereOnTypesTopDownM :: Monad m => (Type a -> m (Type a)) -> Type a -> m (Type a) #

getAnnForType :: Type a -> a #

isMonoType :: Type a -> Bool #

Check whether a type is a monotype

overConstraintArgs :: Functor f => ([Type a] -> f [Type a]) -> Constraint a -> f (Constraint a) #

rowFromList :: ([RowListItem a], Type a) -> Type a #

Convert a list of labels and types to a row

rowToList :: Type a -> ([RowListItem a], Type a) #

Convert a row to a list of pairs of labels and types

srcTUnknown :: Int -> SourceType #

externsIsCurrentVersion :: ExternsFile -> Bool #

Check whether the version in an externs file matches the currently running version.

moduleToExternsFile :: Module -> Environment -> Map Ident Ident -> ExternsFile #

Generate an externs file for all declarations in a module.

The `Map Ident Ident` argument should contain any top-level `GenIdent`s that were rewritten to `Ident`s when the module was compiled; this rewrite only happens in the CoreFn, not the original module AST, so it needs to be applied to the exported names here also. (The appropriate map is returned by `renameInModule`.)

applyExternsFileToEnvironment :: ExternsFile -> Environment -> Environment #

Convert an externs file back into a module

externsFileName :: FilePath #

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

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

makeTypeClassData :: [(Text, Maybe SourceType)] -> [(Ident, SourceType)] -> [SourceConstraint] -> [FunctionalDependency] -> Bool -> TypeClassData #

A constructor for TypeClassData that computes which type class arguments are fully determined and argument covering sets. Fully determined means that this argument cannot be used when selecting a type class instance. A covering set is a minimal collection of arguments that can be used to find an instance and therefore determine all other type arguments.

An example of the difference between determined and fully determined would be with the class: ```class C a b c | a -> b, b -> a, b -> c``` In this case, `a` must differ when `b` differs, and vice versa - each is determined by the other. Both `a` and `b` can be used in selecting a type class instance. However, `c` cannot - it is fully determined by `a` and `b`.

Define a graph of type class arguments with edges being fundep determiners to determined. Each argument also has a self looping edge. An argument is fully determined if doesn't appear at the start of a path of strongly connected components. An argument is not fully determined otherwise.

The way we compute this is by saying: an argument X is fully determined if there are arguments that determine X that X does not determine. This is the same thing: everything X determines includes everything in its SCC, and everything determining X is either before it in an SCC path, or in the same SCC.

isPlainIdent :: Ident -> Bool #

srcInstanceType :: SourceSpan -> [(Text, SourceType)] -> Qualified (ProperName 'ClassName) -> [SourceType] -> SourceType #

Construct the type of an instance declaration from its parts. Used in error messages describing unnamed instances.

graph :: [FilePath] -> IO (Either MultipleErrors Value, MultipleErrors) #

Given a set of filepaths, try to build the dependency graph and return that as its JSON representation (or a bunch of errors, if any)

ffiCodegen' :: Map ModuleName FilePath -> Set CodegenTarget -> Maybe (ModuleName -> String -> FilePath) -> Module Ann -> Make () #

FFI check and codegen action. If path maker is supplied copies foreign module to the output.

cacheDbFile :: FilePath -> FilePath #

Given the output directory, determines the location for the CacheDb file

make :: forall m. (MonadBaseControl IO m, MonadError MultipleErrors m, MonadWriter MultipleErrors m) => MakeActions m -> [PartialResult Module] -> m [ExternsFile] #

Compiles in "make" mode, compiling each module separately to a `.js` file and an `externs.cbor` file.

If timestamps or hashes have not changed, existing externs files can be used to provide upstream modules' types without having to typecheck those modules again.

runMake :: Options -> Make a -> IO (Either MultipleErrors a, MultipleErrors) #

Execute a `Make` monad, returning either errors, or the result of the compile plus any warnings.

lint :: forall m. MonadWriter MultipleErrors m => Module -> m () #

Lint the PureScript AST. | | Right now, this pass performs a shadowing check and a check for unused bindings.

getIdentName :: Name -> Maybe Ident #

everythingWithContextOnTypes :: s -> r -> (r -> r -> r) -> (s -> Type a -> (s, r)) -> Type a -> r #

checkExhaustiveExpr :: forall m. MonadWriter MultipleErrors m => SourceSpan -> Environment -> ModuleName -> Expr -> m Expr #

Exhaustivity checking

isTrueExpr :: Expr -> Bool #

everywhereOnValuesM :: forall m. Monad m => (Declaration -> m Declaration) -> (Expr -> m Expr) -> (Binder -> m Binder) -> (Declaration -> m Declaration, Expr -> m Expr, Binder -> m Binder) #

lintImports :: forall m. MonadWriter MultipleErrors m => Module -> Env -> UsedImports -> m () #

Find and warn on:

- Unused import statements (qualified or unqualified)
- Unused references in an explicit import list
- Implicit imports of modules
- Implicit imports into a virtual module (unless the virtual module only has members from one module imported)
- Imports using `hiding` (this is another form of implicit importing)

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

isExplicit :: ImportDeclarationType -> Bool #

everywhereWithContextOnValues :: forall s. s -> (s -> Declaration -> (s, Declaration)) -> (s -> Expr -> (s, Expr)) -> (s -> Binder -> (s, Binder)) -> (s -> CaseAlternative -> (s, CaseAlternative)) -> (s -> DoNotationElement -> (s, DoNotationElement)) -> (s -> Guard -> (s, Guard)) -> (Declaration -> Declaration, Expr -> Expr, Binder -> Binder, CaseAlternative -> CaseAlternative, DoNotationElement -> DoNotationElement, Guard -> Guard) #

everywhereOnTypes :: (Type a -> Type a) -> Type a -> Type a #

rebuildModule :: forall m. (MonadBaseControl IO m, MonadError MultipleErrors m, MonadWriter MultipleErrors m) => MakeActions m -> [ExternsFile] -> Module -> m ExternsFile #

Rebuild a single module.

This function is used for fast-rebuild workflows (PSCi and psc-ide are examples).

rebuildModule' :: forall m. (MonadBaseControl IO m, MonadError MultipleErrors m, MonadWriter MultipleErrors m) => MakeActions m -> Env -> [ExternsFile] -> Module -> m ExternsFile #

inferForeignModules :: forall m. MonadIO m => Map ModuleName (Either RebuildPolicy FilePath) -> m (Map ModuleName FilePath) #

Infer the module name for a module by looking for the same filename with a .js extension.

runSupply :: Integer -> Supply a -> (a, Integer) #

runSupplyT :: Integer -> SupplyT m a -> m (a, Integer) #

getModuleName :: Module -> ModuleName #

Return a module's name.

getModuleSourceSpan :: Module -> SourceSpan #

Return a module's source span.

importPrim :: Module -> Module #

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

initEnvironment :: Environment #

The initial environment with no values and only the default javascript types defined

defaultPPEOptions :: PPEOptions #

Default options for PPEOptions

errorMessage'' :: NonEmpty SourceSpan -> SimpleErrorMessage -> MultipleErrors #

Create an error set from a single simple error message and source annotations

prettyPrintMultipleErrors :: PPEOptions -> MultipleErrors -> String #

Pretty print multiple errors

moduleSignature :: Module -> ModuleSignature #

sortModules :: forall m a. MonadError MultipleErrors m => DependencyDepth -> (a -> ModuleSignature) -> [a] -> m ([a], ModuleGraph) #

Sort a collection of modules based on module dependencies.

Reports an error if the module graph contains a cycle.

isBuiltinModuleName :: ModuleName -> Bool #

renameInModule :: Module Ann -> (Map Ident Ident, Module Ann) #

Renames within each declaration in a module. Returns the map of renamed identifiers in the top-level scope, so that they can be renamed in the externs files as well.

collapseBindingGroups :: [Declaration] -> [Declaration] #

Collapse all binding groups to individual declarations

createBindingGroups :: forall m. MonadError MultipleErrors m => ModuleName -> [Declaration] -> m [Declaration] #

desugar :: MonadSupply m => MonadError MultipleErrors m => MonadWriter MultipleErrors m => MonadState (Env, UsedImports) m => [ExternsFile] -> Module -> m Module #

The desugaring pipeline proceeds as follows:

- Remove signed literals in favour of `negate` applications
- Desugar object literals with wildcards into lambdas
- Desugar operator sections
- Desugar do-notation
- Desugar ado-notation
- Desugar top-level case declarations into explicit case expressions
- Desugar type declarations into value declarations with explicit type annotations
- Qualify any unqualified names and types
- Rebracket user-defined binary operators
- Introduce newtypes for type class dictionaries and value declarations for instances
- Group mutually recursive value and data declarations into binding groups.

desugarCaseGuards :: forall m. (MonadSupply m, MonadError MultipleErrors m) => [Declaration] -> m [Declaration] #

externsEnv :: forall m. (MonadError MultipleErrors m, MonadWriter MultipleErrors m) => Env -> ExternsFile -> m Env #

Create an environment from a collection of externs files

primEnv :: Env #

Environment which only contains the Prim modules.

emptyCheckState :: Environment -> CheckState #

Create an empty `CheckState`

typeCheckModule :: forall m. (MonadSupply m, MonadState CheckState m, MonadError MultipleErrors m, MonadWriter MultipleErrors m) => Map ModuleName Exports -> Module -> m Module #

Type check an entire module and ensure all types and classes defined within the module that are required by exported members are also exported.

renderProgressMessage :: Text -> ProgressMessage -> Text #

Render a progress message

buildMakeActions #

Arguments

:: FilePath | the output directory
-> Map ModuleName (Either RebuildPolicy FilePath) | a map between module names and paths to the file containing the PureScript module
-> Map ModuleName FilePath | a map between module name and the file containing the foreign javascript for the module
-> Bool | Generate a prefix comment?
-> MakeActions Make |

A set of make actions that read and write modules from the given directory.

checkForeignDecls :: Module ann -> FilePath -> Make (Either MultipleErrors (ForeignModuleType, Set Ident)) #

Check that the declarations in a given PureScript module match with those in its corresponding foreign module.

readCacheDb' #

Arguments

:: (MonadIO m, MonadError MultipleErrors m) |
=> FilePath | The path to the output directory
-> m CacheDb |

writeCacheDb' #

Arguments

:: (MonadIO m, MonadError MultipleErrors m) |
=> FilePath | The path to the output directory
-> CacheDb | The CacheDb to be written
-> m () |

getTimestamp :: (MonadIO m, MonadError MultipleErrors m) => FilePath -> m UTCTime #

Get a file's modification time in the `Make` monad, capturing any errors using the `MonadError` instance.

getTimestampMaybe :: (MonadIO m, MonadError MultipleErrors m) => FilePath -> m (Maybe UTCTime) #

Get a file's modification time in the `Make` monad, returning Nothing if the file does not exist.

hashFile :: (MonadIO m, MonadError MultipleErrors m) => FilePath -> m ContentHash #

makeIO :: (MonadIO m, MonadError MultipleErrors m) => Text -> IO a -> m a #

Run an `IO` action in the `Make` monad. The `String` argument should describe what we were trying to do; it is used for rendering errors in the case that an IOException is thrown.

readExternsFile :: (MonadIO m, MonadError MultipleErrors m) => FilePath -> m (Maybe ExternsFile) #

Read an externs file, returning `Nothing` if the file does not exist, could not be parsed, or was generated by a different version of the compiler.

readJSONFile :: (MonadIO m, MonadError MultipleErrors m) => FromJSON a => FilePath -> m (Maybe a) #

Read a JSON file in the `Make` monad, returning `Nothing` if the file does not exist or could not be parsed. Errors are captured using the `MonadError` instance.

readTextFile :: (MonadIO m, MonadError MultipleErrors m) => FilePath -> m Text #

Read a text file strictly in the `Make` monad, capturing any errors using the `MonadError` instance.

writeCborFile :: (MonadIO m, MonadError MultipleErrors m) => Serialise a => FilePath -> a -> m () #

writeJSONFile :: (MonadIO m, MonadError MultipleErrors m) => ToJSON a => FilePath -> a -> m () #

Write a JSON file in the `Make` monad, capturing any errors using the `MonadError` instance.

writeTextFile :: FilePath -> ByteString -> Make () #

Write a text file in the `Make` monad, capturing any errors using the `MonadError` instance.

readJSONFileIO :: FromJSON a => FilePath -> IO (Maybe a) #

readCborFile :: (MonadIO m, MonadError MultipleErrors m) => Serialise a => FilePath -> m (Maybe a) #

Read a Cbor encoded file in the `Make` monad, returning `Nothing` if the file does not exist or could not be parsed. Errors are captured using the `MonadError` instance.

readCborFileIO :: Serialise a => FilePath -> IO (Maybe a) #

writeCborFileIO :: Serialise a => FilePath -> a -> IO () #

singleError :: ErrorMessage -> MultipleErrors #

Create an error set from a single error message

parU :: forall m a b. MonadError MultipleErrors m => [a] -> (a -> m b) -> m [b] #

Collect errors in in parallel

prettyPrintType :: Int -> Type a -> String #

Generate a pretty-printed string representing a `Type`

prettyPrintTypeWithUnicode :: Int -> Type a -> String #

Generate a pretty-printed string representing a `Type` using unicode symbols where applicable

prettyPrintTypeAtom :: Int -> Type a -> String #

Generate a pretty-printed string representing a Type, as it should appear inside parentheses

tyFunction :: SourceType #

Type constructor for functions

tyRecord :: SourceType #

Type constructor for records

rowToSortedList :: Type a -> ([RowListItem a], Type a) #

Convert a row to a list of pairs of labels and types, sorted by the labels.

prettyPrintBinder :: Binder -> Text #

Generate a pretty-printed string representing a Binder

isBySourcePos :: QualifiedBy -> Bool #

desugarAdoModule :: forall m. (MonadSupply m, MonadError MultipleErrors m) => Module -> m Module #

Replace all `AdoNotationBind` and `AdoNotationValue` constructors with applications of the pure and apply functions in scope, and all `AdoNotationLet` constructors with let expressions.

declSourceSpan :: Declaration -> SourceSpan #

freshIdent' :: MonadSupply m => m Ident #

createBindingGroupsModule :: MonadError MultipleErrors m => Module -> m Module #

Replace all sets of mutually-recursive declarations in a module with binding groups

positionedError :: SourceSpan -> ErrorMessageHint #

desugarCases :: forall m. (MonadSupply m, MonadError MultipleErrors m) => [Declaration] -> m [Declaration] #

Replace all top-level binders with case expressions.

desugarCasesModule :: (MonadSupply m, MonadError MultipleErrors m) => Module -> m Module #

Replace all top-level binders in a module with case expressions.

withPosition :: SourceSpan -> ErrorMessage -> ErrorMessage #

guardWith :: MonadError e m => e -> Bool -> m () #

Make an assertion, failing with an error message

desugarDoModule :: forall m. (MonadSupply m, MonadError MultipleErrors m) => Module -> m Module #

Replace all `DoNotationBind` and `DoNotationValue` constructors with applications of the bind function in scope, and all `DoNotationLet` constructors with let expressions.

desugarLetPatternModule :: Module -> Module #

Replace every `BoundValueDeclaration` in `Let` expressions with `Case` expressions.

desugarImports :: forall m. (MonadError MultipleErrors m, MonadWriter MultipleErrors m, MonadState (Env, UsedImports) m) => Module -> m Module #

Replaces all local names with qualified names.

warnAndRethrow :: (MonadError e m, MonadWriter e m) => (e -> e) -> m a -> m a #

warnAndRethrowWithPosition :: (MonadError MultipleErrors m, MonadWriter MultipleErrors m) => SourceSpan -> m a -> m a #

everywhereOnTypesM :: Monad m => (Type a -> m (Type a)) -> Type a -> m (Type a) #

warnWithPosition :: MonadWriter MultipleErrors m => SourceSpan -> m a -> m a #

internalModuleSourceSpan :: String -> SourceSpan #

disqualifyFor :: Maybe ModuleName -> Qualified a -> Maybe a #

Remove the qualification from a value when it is qualified with a particular module name.

isUnqualified :: Qualified a -> Bool #

Checks whether a qualified value is not actually qualified with a module reference

desugarObjectConstructors :: forall m. (MonadSupply m, MonadError MultipleErrors m) => Module -> m Module #

desugarDecl :: forall m. (MonadSupply m, MonadError MultipleErrors m) => Declaration -> m Declaration #

desugarSignedLiterals :: Module -> Module #

Removes unary negation operators and replaces them with calls to `negate`.

rebracket :: forall m. MonadError MultipleErrors m => MonadSupply m => [ExternsFile] -> Module -> m Module #

Remove explicit parentheses and reorder binary operator applications.

This pass requires name desugaring and export elaboration to have run first.

rebracketFiltered :: forall m. MonadError MultipleErrors m => MonadSupply m => RebracketCaller -> (Declaration -> Bool) -> [ExternsFile] -> Module -> m Module #

A version of `rebracket` which allows you to choose which declarations should be affected. This is used in docs generation, where we want to desugar type operators in instance declarations to ensure that instances are paired up with their types correctly, but we don't want to desugar type operators in value declarations.

checkFixityExports :: forall m. MonadError MultipleErrors m => Module -> m Module #

Checks all the fixity exports within a module to ensure that members aliased by the operators are also exported from the module.

This pass requires name desugaring and export elaboration to have run first.

eraseOpName :: OpName a -> OpName 'AnyOpName #

srcTypeApp :: SourceType -> SourceType -> SourceType #

desugarTypeClasses :: (MonadSupply m, MonadError MultipleErrors m) => [ExternsFile] -> Module -> m Module #

Add type synonym declarations for type class dictionary types, and value declarations for type class instance dictionary expressions.

typeClassMemberName :: Declaration -> Text #

superClassDictionaryNames :: [Constraint a] -> [Text] #

primClasses :: Map (Qualified (ProperName 'ClassName)) TypeClassData #

The primitive class map. This just contains the `Partial` class. `Partial` is used as a kind of magic constraint for partial functions.

primCoerceClasses :: Map (Qualified (ProperName 'ClassName)) TypeClassData #

primIntClasses :: Map (Qualified (ProperName 'ClassName)) TypeClassData #

primRowClasses :: Map (Qualified (ProperName 'ClassName)) TypeClassData #

primRowListClasses :: Map (Qualified (ProperName 'ClassName)) TypeClassData #

primSymbolClasses :: Map (Qualified (ProperName 'ClassName)) TypeClassData #

primTypeErrorClasses :: Map (Qualified (ProperName 'ClassName)) TypeClassData #

qualify :: ModuleName -> Qualified a -> (ModuleName, a) #

Provide a default module name, if a name is unqualified

deriveInstances :: forall m. (MonadError MultipleErrors m, MonadSupply m) => Module -> m Module #

Elaborates deriving instance declarations by code generation.

replaceAllTypeVars :: [(Text, Type a)] -> Type a -> Type a #

Replace named type variables with types

srcTypeLevelString :: PSString -> SourceType #

checkNewtype :: forall m. MonadError MultipleErrors m => ProperName 'TypeName -> [DataConstructorDeclaration] -> m (DataConstructorDeclaration, (Ident, SourceType)) #

Check that a newtype has just one data constructor with just one field, or throw an error. If the newtype is valid, this function returns the single data constructor declaration and the single field, as a `proof` that the newtype was indeed a valid newtype.

desugarTypeDeclarationsModule :: forall m. MonadError MultipleErrors m => Module -> m Module #

Replace all top level type declarations in a module with type annotations

everywhereOnValuesTopDownM :: forall m. Monad m => (Declaration -> m Declaration) -> (Expr -> m Expr) -> (Binder -> m Binder) -> (Declaration -> m Declaration, Expr -> m Expr, Binder -> m Binder) #

kindArity :: Type a -> Int #

nominalRolesForKind :: Type a -> [Role] #

Given the kind of a type, generate a list `Nominal` roles. This is used for opaque foreign types as well as type classes.

mkQualified :: a -> ModuleName -> Qualified a #

Makes a qualified value from a name and module name.

containsForAll :: Type a -> Bool #

Check if a type contains `forall`

freeTypeVariables :: Type a -> [Text] #

Collect all free type variables appearing in a type

unapplyTypes :: Type a -> (Type a, [Type a], [Type a]) #

kindType :: SourceType #

Kind of ground types

(-:>) :: SourceType -> SourceType -> SourceType infixr 4 #

internalCompilerError :: (MonadError MultipleErrors m, HasCallStack) => Text -> m a #

getEnv :: MonadState CheckState m => m Environment #

Get the current `Environment`

getTypeClassDictionaries :: MonadState CheckState m => m (Map QualifiedBy (Map (Qualified (ProperName 'ClassName)) (Map (Qualified Ident) (NonEmpty NamedDict)))) #

Get the currently available map of type class dictionaries

unsafeCheckCurrentModule :: forall m. (MonadError MultipleErrors m, MonadState CheckState m) => m ModuleName #

replaceAllTypeSynonyms :: (e ~ MultipleErrors, MonadState CheckState m, MonadError e m) => SourceType -> m SourceType #

Replace fully applied type synonyms

completeBinderList :: Type a -> Maybe ([(a, (Text, Type a))], Type a) #

Collect a complete set of kind-annotated quantifiers at the front of a type.

srcTypeVar :: Text -> SourceType #

usedTypeVariables :: Type a -> [Text] #

Collect all type variables appearing in a type

kindRow :: SourceType -> SourceType #

tyBoolean :: SourceType #

Type constructor for booleans

tyInt :: SourceType #

Type constructor for integers

tyString :: SourceType #

Type constructor for strings

addHints :: [ErrorMessageHint] -> MultipleErrors -> MultipleErrors #

Add hints to an error message

elaborateKind :: (MonadError MultipleErrors m, MonadState CheckState m, HasCallStack) => SourceType -> m SourceType #

unifyKinds' :: (MonadError MultipleErrors m, MonadState CheckState m, HasCallStack) => SourceType -> SourceType -> m () #

Does not attach positions to the error node, instead relies on the | local position context. This is useful when invoking kind unification | outside of kind checker internals.

withErrorMessageHint :: (MonadState CheckState m, MonadError MultipleErrors m) => ErrorMessageHint -> m a -> m a #

unapplyKinds :: Type a -> ([Type a], Type a) #

freshKindWithKind :: MonadState CheckState m => SourceSpan -> SourceType -> m SourceType #

lookupRoles :: Environment -> Qualified (ProperName 'TypeName) -> [Role] #

Lookup the roles for a type in the environment. If the type does not have roles (e.g. is a type synonym or a type variable), then this function returns an empty list.

alignRowsWith :: (Label -> Type a -> Type a -> r) -> Type a -> Type a -> ([r], (([RowListItem a], Type a), ([RowListItem a], Type a))) #

Align two rows of types, splitting them into three parts:

- Those types which appear in both rows
- Those which appear only on the left
- Those which appear only on the right

Note: importantly, we preserve the order of the types with a given label.

containsUnknowns :: Type a -> Bool #

Check if a type contains unknowns in a position that is relevant to constraint solving. (Kinds are not.)

srcConstraint :: Qualified (ProperName 'ClassName) -> [SourceType] -> [SourceType] -> Maybe ConstraintData -> SourceConstraint #

kindOf :: (MonadError MultipleErrors m, MonadState CheckState m, HasCallStack) => SourceType -> m (SourceType, SourceType) #

Infer the kind of a single type

kindOfWithUnknowns :: (MonadError MultipleErrors m, MonadState CheckState m, HasCallStack) => SourceType -> m (([(Unknown, SourceType)], SourceType), SourceType) #

kindOfWithScopedVars :: (MonadError MultipleErrors m, MonadState CheckState m, HasCallStack) => SourceType -> m (([(Text, SourceType)], SourceType), SourceType) #

Infer the kind of a single type, returning the kinds of any scoped type variables

kindOfData :: forall m. (MonadError MultipleErrors m, MonadState CheckState m) => ModuleName -> DataDeclarationArgs -> m DataDeclarationResult #

kindOfTypeSynonym :: forall m. (MonadError MultipleErrors m, MonadState CheckState m) => ModuleName -> TypeDeclarationArgs -> m TypeDeclarationResult #

kindOfClass :: forall m. (MonadError MultipleErrors m, MonadState CheckState m) => ModuleName -> ClassDeclarationArgs -> m ClassDeclarationResult #

kindsOfAll :: forall m. (MonadError MultipleErrors m, MonadState CheckState m) => ModuleName -> [TypeDeclarationArgs] -> [DataDeclarationArgs] -> [ClassDeclarationArgs] -> m ([TypeDeclarationResult], [DataDeclarationResult], [ClassDeclarationResult]) #

unifyKinds :: (MonadError MultipleErrors m, MonadState CheckState m, HasCallStack) => SourceType -> SourceType -> m () #

subsumesKind :: (MonadError MultipleErrors m, MonadState CheckState m, HasCallStack) => SourceType -> SourceType -> m () #

instantiateKind :: (MonadError MultipleErrors m, MonadState CheckState m, HasCallStack) => (SourceType, SourceType) -> SourceType -> m SourceType #

checkKind :: (MonadError MultipleErrors m, MonadState CheckState m, HasCallStack) => SourceType -> SourceType -> m SourceType #

inferKind :: (MonadError MultipleErrors m, MonadState CheckState m, HasCallStack) => SourceType -> m (SourceType, SourceType) #

checkConstraint :: forall m. (MonadError MultipleErrors m, MonadState CheckState m) => SourceConstraint -> m SourceConstraint #

checkInstanceDeclaration :: forall m. (MonadError MultipleErrors m, MonadState CheckState m) => ModuleName -> InstanceDeclarationArgs -> m InstanceDeclarationResult #

checkKindDeclaration :: forall m. (MonadSupply m, MonadError MultipleErrors m, MonadState CheckState m) => ModuleName -> SourceType -> m SourceType #

checkTypeKind :: (MonadError MultipleErrors m, MonadState CheckState m, HasCallStack) => SourceType -> SourceType -> m () #

Check the kind of a type, failing if it is not of kind *.

unknownsWithKinds :: forall m. (MonadState CheckState m, MonadError MultipleErrors m, HasCallStack) => [Unknown] -> m [(Unknown, SourceType)] #

freshKind :: MonadState CheckState m => SourceSpan -> m SourceType #

bindLocalTypeVariables :: MonadState CheckState m => ModuleName -> [(ProperName 'TypeName, SourceType)] -> m a -> m a #

Temporarily bind a collection of names to local type variables

debugType :: Type a -> String #

lookupTypeVariable :: (e ~ MultipleErrors, MonadState CheckState m, MonadError e m) => ModuleName -> Qualified (ProperName 'TypeName) -> m SourceType #

Lookup the kind of a type by name in the `Environment`

withFreshSubstitution :: MonadState CheckState m => m a -> m a #

srcKindedType :: SourceType -> SourceType -> SourceType #

checkRoles #

Arguments

:: forall m. MonadError MultipleErrors m |
=> [(Text, Maybe SourceType, Role)] | type parameters for the data type whose roles we are checking
-> [Role] | roles declared for the data type
-> m () |

Compares the inferred roles to the explicitly declared roles and ensures that the explicitly declared roles are not more permissive than the inferred ones.

checkRoleDeclarationArity :: forall m. MonadError MultipleErrors m => ProperName 'TypeName -> [Role] -> Int -> m () #

inferRoles #

Arguments

:: Environment |
-> ModuleName |
-> ProperName 'TypeName | The name of the data type whose roles we are checking
-> [(Text, Maybe SourceType)] | type parameters for the data type whose roles we are checking
-> [DataConstructorDeclaration] | constructors of the data type whose roles we are checking
-> [Role] |

Infers roles for the given data type declaration.

inferDataBindingGroupRoles :: Environment -> ModuleName -> [RoleDeclarationData] -> [DataDeclaration] -> ProperName 'TypeName -> [(Text, Maybe SourceType)] -> [Role] #

everythingWithContextOnValues :: forall s r. s -> r -> (r -> r -> r) -> (s -> Declaration -> (s, r)) -> (s -> Expr -> (s, r)) -> (s -> Binder -> (s, r)) -> (s -> CaseAlternative -> (s, r)) -> (s -> DoNotationElement -> (s, r)) -> (Declaration -> r, Expr -> r, Binder -> r, CaseAlternative -> r, DoNotationElement -> r) #

everywhereWithContextOnValuesM :: forall m s. Monad m => s -> (s -> Declaration -> m (s, Declaration)) -> (s -> Expr -> m (s, Expr)) -> (s -> Binder -> m (s, Binder)) -> (s -> CaseAlternative -> m (s, CaseAlternative)) -> (s -> DoNotationElement -> m (s, DoNotationElement)) -> (s -> Guard -> m (s, Guard)) -> (Declaration -> m Declaration, Expr -> m Expr, Binder -> m Binder, CaseAlternative -> m CaseAlternative, DoNotationElement -> m DoNotationElement, Guard -> m Guard) #

nonEmptySpan :: SourceAnn -> Maybe SourceSpan #

replaceTypeVars :: Text -> Type a -> Type a -> Type a #

Replace a type variable, taking into account variable shadowing

getHints :: MonadState CheckState m => m [ErrorMessageHint] #

These hints are added at the front, so the most nested hint occurs at the front, but the simplifier assumes the reverse order.

isREmpty :: forall a. Type a -> Bool #

replaceAllTypeSynonymsM :: MonadError MultipleErrors m => SynonymMap -> KindMap -> SourceType -> m SourceType #

Replace fully applied type synonyms by explicitly providing a `SynonymMap`.

typesOf :: (MonadSupply m, MonadState CheckState m, MonadError MultipleErrors m, MonadWriter MultipleErrors m) => BindingGroupType -> ModuleName -> [((SourceAnn, Ident), Expr)] -> m [((SourceAnn, Ident), (Expr, SourceType))] #

Infer the types of multiple mutually-recursive values, and return elaborated values including type class dictionaries and type annotations.

escalateWarningWhen :: (MonadWriter MultipleErrors m, MonadError MultipleErrors m) => (ErrorMessage -> Bool) -> m a -> m a #

Runs a computation listening for warnings and then escalating any warnings that match the predicate to error status.

onErrorMessages :: (ErrorMessage -> ErrorMessage) -> MultipleErrors -> MultipleErrors #

Lift a function on ErrorMessage to a function on MultipleErrors

onTypesInErrorMessage :: (SourceType -> SourceType) -> ErrorMessage -> ErrorMessage #

withoutPosition :: ErrorMessage -> ErrorMessage #

getLocalContext :: MonadState CheckState m => m Context #

Get locally-bound names in context, to create an error message.

lookupUnkName :: MonadState CheckState m => Unknown -> m (Maybe Text) #

mkForAll :: [(a, (Text, Maybe (Type a)))] -> Type a -> Type a #

Universally quantify a type

displaySourcePos :: SourcePos -> Text #

displaySourcePosShort :: SourcePos -> Text #

displayStartEndPosShort :: SourceSpan -> Text #

displaySourceSpan :: FilePath -> SourceSpan -> Text #

widenSourceSpan :: SourceSpan -> SourceSpan -> SourceSpan #

widenSourceAnn :: SourceAnn -> SourceAnn -> SourceAnn #

showAssoc :: Associativity -> String #

readAssoc :: String -> Associativity #

getValOpName :: Name -> Maybe (OpName 'ValueOpName) #

getTypeName :: Name -> Maybe (ProperName 'TypeName) #

getTypeOpName :: Name -> Maybe (OpName 'TypeOpName) #

getDctorName :: Name -> Maybe (ProperName 'ConstructorName) #

getClassName :: Name -> Maybe (ProperName 'ClassName) #

showOp :: OpName a -> Text #

coerceOpName :: OpName a -> OpName b #

codegenTargets :: Map String CodegenTarget #

srcTypeLevelInt :: Integer -> SourceType #

srcTypeWildcard :: SourceType #

srcKindApp :: SourceType -> SourceType -> SourceType #

srcForAll :: TypeVarVisibility -> Text -> Maybe SourceType -> SourceType -> Maybe SkolemScope -> SourceType #

srcConstrainedType :: SourceConstraint -> SourceType -> SourceType #

srcREmpty :: SourceType #

srcRCons :: Label -> SourceType -> SourceType -> SourceType #

toREmptyKinded :: forall a. Type a -> Maybe (a, Maybe (Type a)) #

mapConstraintArgsAll :: ([Type a] -> [Type a]) -> Constraint a -> Constraint a #

overConstraintArgsAll :: Applicative f => ([Type a] -> f [Type a]) -> Constraint a -> f (Constraint a) #

constraintDataToJSON :: ConstraintData -> Value #

constraintToJSON :: (a -> Value) -> Constraint a -> Value #

typeToJSON :: forall a. (a -> Value) -> Type a -> Value #

typeVarVisToJSON :: TypeVarVisibility -> Value #

constraintDataFromJSON :: Value -> Parser ConstraintData #

constraintFromJSON :: forall a. Parser a -> (Value -> Parser a) -> Value -> Parser (Constraint a) #

typeFromJSON :: forall a. Parser a -> (Value -> Parser a) -> Value -> Parser (Type a) #

typeVarVisFromJSON :: Value -> Parser TypeVarVisibility #

srcRowListItem :: Label -> SourceType -> RowListItem SourceAnn #

addVisibility :: [(Text, TypeVarVisibility)] -> Type a -> Type a #

Add visible type abstractions to top-level foralls.

quantify :: Type a -> Type a #

Universally quantify over all type variables appearing free in a type

moveQuantifiersToFront :: Type a -> Type a #

Move all universal quantifiers to the front of a type

unknowns :: Type a -> IntSet #

unapplyConstraints :: Type a -> ([Constraint a], Type a) #

setAnnForType :: a -> Type a -> Type a #

annForType :: Lens' (Type a) a #

compareType :: Type a -> Type b -> Ordering #

eqMaybeType :: Maybe (Type a) -> Maybe (Type b) -> Bool #

eqConstraint :: Constraint a -> Constraint b -> Bool #

compareMaybeType :: Maybe (Type a) -> Maybe (Type b) -> Ordering #

compareConstraint :: Constraint a -> Constraint b -> Ordering #

allPrimTypes :: Map (Qualified (ProperName 'TypeName)) (SourceType, TypeKind) #

This `Map` contains all of the prim types from all Prim modules.

allPrimClasses :: Map (Qualified (ProperName 'ClassName)) TypeClassData #

This contains all of the type classes from all Prim modules.

computeCoveringSets :: Int -> [FunctionalDependency] -> (Set Int, Set (Set Int)) #

showDataDeclType :: DataDeclType -> Text #

kindConstraint :: SourceType #

kindSymbol :: SourceType #

kindDoc :: SourceType #

kindOrdering :: SourceType #

kindRowList :: SourceType -> SourceType #

kindOfREmpty :: SourceType #

tyForall :: Text -> SourceType -> SourceType -> SourceType #

tyVar :: Text -> SourceType #

tyChar :: SourceType #

Type constructor for strings

tyNumber :: SourceType #

Type constructor for numbers

tyArray :: SourceType #

Type constructor for arrays

primClass :: Qualified (ProperName 'ClassName) -> (SourceType -> SourceType) -> [(Qualified (ProperName 'TypeName), (SourceType, TypeKind))] #

primTypes :: Map (Qualified (ProperName 'TypeName)) (SourceType, TypeKind) #

The primitive types in the external environment with their associated kinds. There are also pseudo `Fail`, `Warn`, and `Partial` types that correspond to the classes with the same names.

primBooleanTypes :: Map (Qualified (ProperName 'TypeName)) (SourceType, TypeKind) #

primCoerceTypes :: Map (Qualified (ProperName 'TypeName)) (SourceType, TypeKind) #

primOrderingTypes :: Map (Qualified (ProperName 'TypeName)) (SourceType, TypeKind) #

primRowTypes :: Map (Qualified (ProperName 'TypeName)) (SourceType, TypeKind) #

primRowListTypes :: Map (Qualified (ProperName 'TypeName)) (SourceType, TypeKind) #

primSymbolTypes :: Map (Qualified (ProperName 'TypeName)) (SourceType, TypeKind) #

primIntTypes :: Map (Qualified (ProperName 'TypeName)) (SourceType, TypeKind) #

primTypeErrorTypes :: Map (Qualified (ProperName 'TypeName)) (SourceType, TypeKind) #

dictTypeName' :: Text -> Text #

binderNamesWithSpans :: Binder -> [(SourceSpan, Ident)] #

isIrrefutable :: Binder -> Bool #

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

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

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)

declRefSourceSpan :: DeclarationRef -> SourceSpan #

getValueRef :: DeclarationRef -> Maybe Ident #

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

isModuleRef :: DeclarationRef -> Bool #

getTypeDeclaration :: Declaration -> Maybe TypeDeclarationData #

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

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

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

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

declSourceAnn :: Declaration -> SourceAnn #

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.

isAnonymousArgument :: Expr -> Bool #

mapGuardedExpr :: (Guard -> Guard) -> (Expr -> Expr) -> GuardedExpr -> GuardedExpr #

litM :: Monad m => (a -> m a) -> Literal a -> m (Literal a) #

inScope :: Ident -> Set ScopedIdent -> Bool #

everythingWithScope :: forall r. Monoid r => (Set ScopedIdent -> Declaration -> r) -> (Set ScopedIdent -> Expr -> r) -> (Set ScopedIdent -> Binder -> r) -> (Set ScopedIdent -> CaseAlternative -> r) -> (Set ScopedIdent -> DoNotationElement -> r) -> (Set ScopedIdent -> Declaration -> r, Set ScopedIdent -> Expr -> r, Set ScopedIdent -> Binder -> r, Set ScopedIdent -> CaseAlternative -> r, Set ScopedIdent -> DoNotationElement -> r) #

accumTypes :: Monoid r => (SourceType -> r) -> (Declaration -> r, Expr -> r, Binder -> r, CaseAlternative -> r, DoNotationElement -> r) #

overTypes :: (SourceType -> SourceType) -> Expr -> Expr #

Map a function over type annotations appearing inside a value

errorSpan :: ErrorMessage -> Maybe (NonEmpty SourceSpan) #

Get the source span for an error

findHint :: (ErrorMessageHint -> Maybe a) -> ErrorMessage -> Maybe a #

errorModule :: ErrorMessage -> Maybe ModuleName #

Get the module name for an error

stripModuleAndSpan :: ErrorMessage -> ErrorMessage #

Remove the module name and span hints from an error

errorCode :: ErrorMessage -> Text #

Get the error code for a particular error type

unwrapErrorMessage :: ErrorMessage -> SimpleErrorMessage #

Extract nested error messages from wrapper errors

errorMessage''' :: [SourceSpan] -> SimpleErrorMessage -> MultipleErrors #

Create an error from multiple (possibly empty) source spans, reversed sorted.

defaultUnknownMap :: TypeMap #

replaceUnknowns :: SourceType -> State TypeMap SourceType #

onTypesInErrorMessageM :: Applicative m => (SourceType -> m SourceType) -> ErrorMessage -> m ErrorMessage #

errorDocUri :: ErrorMessage -> Text #

errorSuggestion :: SimpleErrorMessage -> Maybe ErrorSuggestion #

prettyPrintSuggestedTypeSimplified :: Type a -> String #

prettyPrintKindSignatureFor :: KindSignatureFor -> Text #

prettyPrintRef :: DeclarationRef -> Maybe Text #

suggestionSpan :: ErrorMessage -> Maybe SourceSpan #

showSuggestion :: SimpleErrorMessage -> Text #

ansiColor :: (ColorIntensity, Color) -> String #

ansiColorReset :: String #

colorCode :: Maybe (ColorIntensity, Color) -> Text -> Text #

colorCodeBox :: Maybe (ColorIntensity, Color) -> Box -> Box #

commasAndConjunction :: Text -> [Text] -> Text #

defaultCodeColor :: (ColorIntensity, Color) #

Default color intensity and color for code

prettyPrintSingleError :: PPEOptions -> ErrorMessage -> Box #

Pretty print a single error, simplifying if necessary

lineS :: String -> Box #

toTypelevelString :: Type a -> Maybe Box #

prettyPrintExport :: DeclarationRef -> Text #

prettyPrintImport :: ModuleName -> ImportDeclarationType -> Maybe ModuleName -> Text #

prettyPrintMultipleErrorsBox :: PPEOptions -> MultipleErrors -> [Box] #

Pretty print errors as a Box

prettyPrintMultipleWarnings :: PPEOptions -> MultipleErrors -> String #

Pretty print multiple warnings

prettyPrintMultipleWarningsBox :: PPEOptions -> MultipleErrors -> [Box] #

Pretty print warnings as a Box

prettyPrintMultipleErrorsWith :: PPEOptions -> String -> String -> MultipleErrors -> [Box] #

insertUnkName :: MonadState CheckState m => Unknown -> Text -> m () #

emptySubstitution :: Substitution #

An empty substitution

bindNames :: MonadState CheckState m => Map (Qualified Ident) (SourceType, NameKind, NameVisibility) -> m a -> m a #

Temporarily bind a collection of names to values

bindTypes :: MonadState CheckState m => Map (Qualified (ProperName 'TypeName)) (SourceType, TypeKind) -> m a -> m a #

Temporarily bind a collection of names to types

withScopedTypeVars :: (MonadState CheckState m, MonadWriter MultipleErrors m) => ModuleName -> [(Text, SourceType)] -> m a -> m a #

Temporarily bind a collection of names to types

rethrowWithPositionTC :: (MonadState CheckState m, MonadError MultipleErrors m) => SourceSpan -> m a -> m a #

warnAndRethrowWithPositionTC :: (MonadState CheckState m, MonadError MultipleErrors m, MonadWriter MultipleErrors m) => SourceSpan -> m a -> m a #

withTypeClassDictionaries :: MonadState CheckState m => [NamedDict] -> m a -> m a #

Temporarily make a collection of type class dictionaries available

lookupTypeClassDictionaries :: MonadState CheckState m => QualifiedBy -> m (Map (Qualified (ProperName 'ClassName)) (Map (Qualified Ident) (NonEmpty NamedDict))) #

Lookup type class dictionaries in a module.

lookupTypeClassDictionariesForClass :: MonadState CheckState m => QualifiedBy -> Qualified (ProperName 'ClassName) -> m (Map (Qualified Ident) (NonEmpty NamedDict)) #

Lookup type class dictionaries in a module.

bindLocalVariables :: MonadState CheckState m => [(SourceSpan, Ident, SourceType, NameVisibility)] -> m a -> m a #

Temporarily bind a collection of names to local variables

makeBindingGroupVisible :: MonadState CheckState m => m () #

Update the visibility of all names to Defined

modifyEnv :: MonadState CheckState m => (Environment -> Environment) -> m () #

Modify the `Environment`

withBindingGroupVisible :: MonadState CheckState m => m a -> m a #

Update the visibility of all names to Defined in the scope of the provided action

preservingNames :: MonadState CheckState m => m a -> m a #

Perform an action while preserving the names from the `Environment`.

lookupVariable :: (e ~ MultipleErrors, MonadState CheckState m, MonadError e m) => Qualified Ident -> m SourceType #

Lookup the type of a value by name in the `Environment`

getVisibility :: (e ~ MultipleErrors, MonadState CheckState m, MonadError e m) => Qualified Ident -> m NameVisibility #

Lookup the visibility of a value by name in the `Environment`

checkVisibility :: (e ~ MultipleErrors, MonadState CheckState m, MonadError e m) => Qualified Ident -> m () #

Assert that a name is visible

putEnv :: MonadState CheckState m => Environment -> m () #

Update the `Environment`

runCheck :: Functor m => CheckState -> StateT CheckState m a -> m (a, Environment) #

Run a computation in the typechecking monad, failing with an error, or succeeding with a return value and the final `Environment`.

capturingSubstitution :: MonadState CheckState m => (a -> Substitution -> b) -> m a -> m b #

withoutWarnings :: MonadWriter w m => m a -> m (a, w) #

debugEnv :: Environment -> [String] #

debugTypes :: Environment -> [String] #

debugTypeSynonyms :: Environment -> [String] #

debugTypeClasses :: Environment -> [String] #

debugTypeClassDictionaries :: Environment -> [String] #

debugDataConstructors :: Environment -> [String] #

debugNames :: Environment -> [String] #

debugConstraint :: Constraint a -> String #

debugValue :: Expr -> String #

debugSubstitution :: Substitution -> [String] #

version :: Version #