|
| Agda.TypeChecking.Monad.Base |
|
|
|
|
|
| Synopsis |
|
| data TCState = TCSt {} | | | data FreshThings = Fresh {} | | | initState :: TCState | | | stBuiltinThings :: TCState -> BuiltinThings PrimFun | | | type VisitedModules = Map ModuleName (Interface, ClockTime) | | | type DecodedModules = Map ModuleName (Interface, ClockTime) | | | data Interface = Interface {} | | | data Closure a = Closure {} | | | buildClosure :: MonadTCM tcm => a -> tcm (Closure a) | | | type ConstraintClosure = Closure Constraint | | | | | | | type Constraints = [ConstraintClosure] | | | data Open a = OpenThing [CtxId] a | | | | | data MetaVariable = MetaVar {} | | | | | newtype MetaPriority = MetaPriority Int | | | type MetaInfo = Closure Range | | | type MetaStore = Map MetaId MetaVariable | | | normalMetaPriority :: MetaPriority | | | lowMetaPriority :: MetaPriority | | | highMetaPriority :: MetaPriority | | | getMetaInfo :: MetaVariable -> MetaInfo | | | getMetaScope :: MetaVariable -> ScopeInfo | | | getMetaEnv :: MetaVariable -> TCEnv | | | getMetaSig :: MetaVariable -> Signature | | | type InteractionPoints = Map InteractionId MetaId | | | newtype InteractionId = InteractionId Nat | | | data Signature = Sig {} | | | type Sections = Map ModuleName Section | | | type Definitions = Map QName Definition | | | data Section = Section {} | | | emptySignature :: Signature | | | data DisplayForm = Display Nat [Term] DisplayTerm | | | | | defaultDisplayForm :: QName -> [Open DisplayForm] | | | data Definition = Defn {} | | | type HaskellCode = String | | | type HaskellType = String | | | | | | | | | | | newtype Fields = Fields [(Name, Type)] | | | | | data PrimFun = PrimFun {} | | | defClauses :: Definition -> [Clause] | | | | | defDelayed :: Definition -> Delayed | | | defAbstract :: Definition -> IsAbstract | | | | | | | newtype MutualId = MutId Int | | | type Statistics = Map String Int | | | type CallTrace = Trace (Closure Call) | | | noTrace :: CallTrace | | | | | type BuiltinThings pf = Map String (Builtin pf) | | | | | data TCEnv = TCEnv {} | | | initEnv :: TCEnv | | | type Context = [ContextEntry] | | | data ContextEntry = Ctx {} | | | newtype CtxId = CtxId Nat | | | type LetBindings = Map Name (Open (Term, Type)) | | | | | | | | | | | | | newtype TCMT m a = TCM {} | | | type TCM = TCMT IO | | | class (Applicative tcm, MonadIO tcm, MonadReader TCEnv tcm, MonadState TCState tcm) => MonadTCM tcm where | | | | mapTCMT :: (m (Either TCErr ((a, [TCState]), TCState)) -> n (Either TCErr ((b, [TCState]), TCState))) -> TCMT m a -> TCMT n b | | | patternViolation :: MonadTCM tcm => tcm a | | | internalError :: MonadTCM tcm => String -> tcm a | | | typeError :: MonadTCM tcm => TypeError -> tcm a | | | handleTypeErrorException :: MonadTCM tcm => IO a -> tcm a | | | runTCM :: Monad m => TCMT m a -> m (Either TCErr a) |
|
|
|
| Type checking state
|
|
|
| Constructors | | Instances | |
|
|
|
| Constructors | | Instances | |
|
|
|
|
|
|
| Interface
|
|
|
|
|
|
|
| Constructors | | Instances | |
|
|
| Closure
|
|
|
| Constructors | | Instances | |
|
|
|
|
| Constraints
|
|
|
|
|
| Constructors | | Instances | |
|
|
|
| Constructors | | Instances | |
|
|
|
|
| Open things
|
|
|
| A thing tagged with the context it came from.
| | Constructors | | Instances | |
|
|
| Judgements
|
|
|
| Constructors | | Instances | |
|
|
| Meta variables
|
|
|
| Constructors | | Instances | |
|
|
|
| Constructors | | Instances | |
|
|
|
| Constructors | | Instances | |
|
|
|
| TODO: Not so nice.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Interaction meta variables
|
|
|
|
|
| Constructors | | Instances | |
|
|
| Signature
|
|
|
| Constructors | | Instances | |
|
|
|
|
|
|
|
| Constructors | | Section | | | secTelescope :: Telescope | | | secFreeVars :: Nat | This is the number of parameters when
we're inside the section and 0
outside. It's used to know how much of
the context to apply function from the
section to when translating from
abstract to internal syntax.
|
|
| Instances | |
|
|
|
|
|
| Constructors | | Display Nat [Term] DisplayTerm | The three arguments are:
- n: number of free variables;
- Patterns for arguments, one extra free var which
represents pattern vars. There should n of them.
- Display form. n free variables.
|
| Instances | |
|
|
|
| Constructors | | Instances | |
|
|
|
|
|
| Constructors | | Instances | |
|
|
|
|
|
|
| data HaskellRepresentation | Source |
|
| Constructors | | Instances | |
|
|
|
| Constructors | | Covariant | | | Contravariant | | | Invariant | |
| Instances | |
|
|
|
| Positive means strictly positive and Negative means not strictly
positive.
| | Constructors | | Instances | |
|
|
|
| Constructors | | Axiom | | | | Function | | | | Datatype | | | | Record | | | | Constructor | | | | Primitive | | |
| Instances | |
|
|
|
| Constructors | | Instances | |
|
|
|
| Constructors | | NoReduction no | | | YesReduction yes | |
| Instances | |
|
|
|
| Constructors | | Instances | |
|
|
|
|
|
| Used to specify whether something should be delayed.
| | Constructors | | Instances | |
|
|
|
| Are the clauses of this definition delayed?
|
|
|
|
| Injectivity
|
|
|
| Constructors | | Instances | |
|
|
|
| Constructors | | SortHead | | | PiHead | | | ConHead QName | |
| Instances | |
|
|
| Mutual blocks
|
|
|
| Constructors | | Instances | |
|
|
| Statistics
|
|
|
|
| Trace
|
|
|
|
|
|
|
| Constructors | | Instances | |
|
|
| Builtin things
|
|
|
|
|
| Constructors | | Instances | |
|
|
| Type checking environment
|
|
|
| Constructors | | TCEnv | | | envContext :: Context | | | envLetBindings :: LetBindings | | | envCurrentModule :: ModuleName | | | envAnonymousModules :: [(ModuleName, Nat)] | anonymous modules and their number of free variables
| | envImportPath :: [ModuleName] | to detect import cycles
| | envMutualBlock :: Maybe MutualId | the current (if any) mutual block
| | envAbstractMode :: AbstractMode | When checking the typesignature of a public definition
or the body of a non-abstract definition this is true.
To prevent information about abstract things leaking
outside the module.
| | envReplace :: Bool | Coinductive constructor applications c args get
replaced by a function application f tel, where
tel corresponds to the current telescope and f is
defined as f tel = c args. The initial occurrence
of c in the body of f should not be replaced by
yet another function application, though. To avoid
that this happens the envReplace flag is set to
False when f is checked.
| | envDisplayFormsEnabled :: Bool | Sometimes we want to disable display forms.
| | envReifyInteractionPoints :: Bool | should we try to recover interaction points when reifying?
disabled when generating types for with functions
|
|
| Instances | |
|
|
|
|
| Context
|
|
|
|
|
| Constructors | | Instances | |
|
|
|
| Constructors | | Instances | |
|
|
| Let bindings
|
|
|
|
| Abstract mode
|
|
|
| Constructors | | AbstractMode | abstract things in the current module can be accessed
| | ConcreteMode | no abstract things can be accessed
| | IgnoreAbstractMode | all abstract things can be accessed
|
| Instances | |
|
|
| Type checking errors
|
|
|
|
|
|
|
|
|
| Constructors | | InternalError String | | | NotImplemented String | | | NotSupported String | | | CompilationError String | | | TerminationCheckFailed [([QName], [Range])] | Parameterised on functions which failed to termination
check (grouped if they are mutual), along with ranges
for problematic call sites.
| | PropMustBeSingleton | | | DataMustEndInSort Term | | | ShouldEndInApplicationOfTheDatatype Type | The target of a constructor isn't an application of its
datatype. The Type records what it does target.
| | ShouldBeAppliedToTheDatatypeParameters Term Term | The target of a constructor isn't its datatype applied to
something that isn't the parameters. First term is the correct
target and the second term is the actual target.
| | ShouldBeApplicationOf Type QName | Expected a type to be an application of a particular datatype.
| | ConstructorPatternInWrongDatatype QName QName | constructor, datatype
| | DoesNotConstructAnElementOf QName Term | constructor, type
| | DifferentArities | Varying number of arguments for a function.
| | WrongHidingInLHS Type | The left hand side of a function definition has a hidden argument
where a non-hidden was expected.
| | WrongHidingInLambda Type | Expected a non-hidden function and found a hidden lambda.
| | WrongHidingInApplication Type | A function is applied to a hidden argument where a non-hidden was expected.
| | DependentPatternMatchingOnCodata | | | NotInductive Term | The term does not correspond to an inductive data type.
| | UninstantiatedDotPattern Expr | | | IlltypedPattern Pattern Type | | | TooManyArgumentsInLHS Nat Type | | | WrongNumberOfConstructorArguments QName Nat Nat | | | ShouldBeEmpty Type [Pattern] | | | ShouldBeASort Type | The given type should have been a sort.
| | ShouldBePi Type | The given type should have been a pi.
| | ShouldBeRecordType Type | | | NotAProperTerm | | | UnequalTerms Comparison Term Term Type | | | UnequalTypes Comparison Type Type | | | UnequalTelescopes Comparison Telescope Telescope | | | UnequalHiding Type Type | The two function types have different hiding.
| | UnequalSorts Sort Sort | | | NotLeqSort Sort Sort | | | MetaCannotDependOn MetaId [Nat] Nat | The arguments are the meta variable, the parameters it can
depend on and the paratemeter that it wants to depend on.
| | MetaOccursInItself MetaId | | | GenericError String | | | BuiltinMustBeConstructor String Expr | | | NoSuchBuiltinName String | | | DuplicateBuiltinBinding String Term Term | | | NoBindingForBuiltin String | | | NoSuchPrimitiveFunction String | | | ShadowedModule [ModuleName] | | | BuiltinInParameterisedModule String | | | NoRHSRequiresAbsurdPattern [NamedArg Pattern] | | | AbsurdPatternRequiresNoRHS [NamedArg Pattern] | | | TooFewFields QName [Name] | | | TooManyFields QName [Name] | | | DuplicateFields [Name] | | | DuplicateConstructors [Name] | | | UnexpectedWithPatterns [Pattern] | | | WithClausePatternMismatch Pattern Pattern | | | FieldOutsideRecord | | | ModuleArityMismatch ModuleName Telescope [NamedArg Expr] | | | IncompletePatternMatching Term Args | | | CoverageFailure QName [[Arg Pattern]] | | | UnreachableClauses QName [[Arg Pattern]] | | | CoverageCantSplitOn QName | | | CoverageCantSplitType Type | | | NotStrictlyPositive QName [Occ] | | | LocalVsImportedModuleClash ModuleName | | | UnsolvedMetas [Range] | | | UnsolvedConstraints Constraints | | | CyclicModuleDependency [ModuleName] | | | FileNotFound ModuleName [FilePath] | | | ClashingFileNamesFor ModuleName [FilePath] | | | ModuleNameDoesntMatchFileName ModuleName | NoMatch given | | BothWithAndRHS | | | NotInScope [QName] | | | NoSuchModule QName | | | AmbiguousName QName [QName] | | | AmbiguousModule QName [ModuleName] | | | UninstantiatedModule QName | | | ClashingDefinition QName QName | | | ClashingModule ModuleName ModuleName | | | ClashingImport Name QName | | | ClashingModuleImport Name ModuleName | | | PatternShadowsConstructor Name QName | | | ModuleDoesntExport QName [ImportedName] | | | InvalidPattern Pattern | | | RepeatedVariablesInPattern [Name] | | | NotAModuleExpr Expr | The expr was used in the right hand side of an implicit module
definition, but it wasn't of the form m Delta.
| | NotAnExpression Expr | | | NotAValidLetBinding NiceDeclaration | | | NothingAppliedToHiddenArg Expr | | | NoParseForApplication [Expr] | | | AmbiguousParseForApplication [Expr] [Expr] | | | NoParseForLHS Pattern | | | AmbiguousParseForLHS Pattern [Pattern] | |
| Instances | |
|
|
|
| Constructors | | Instances | |
|
|
| Type checking monad transformer
|
|
|
| Constructors | | Instances | |
|
|
|
|
|
| | Methods | | | Instances | |
|
|
|
|
|
|
|
|
|
|
|
|
|
| Running the type checking monad
|
|
| Produced by Haddock version 2.4.2 |