HORIZON HASKELLDocslts/ghc-9.14.x45dd5372026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 45dd537 · 2026-10-11

ModuleAgda-2.8.0.2Haskell2010

Agda.Interaction.Imports

This module deals with finding imported modules and loading their interface files.

  • 3 types
  • 14 values
  • PackageAgda-2.8.0.2
  • Exports20
  • LanguageHaskell2010
  • LicenceMIT
  • SourceImports.hs
datadata Mode
#

Is the aim to type-check the top-level module, or only to scope-check it?

Instances2Eq, Show
  • Eq ModeDefined in Agda-2.8.0.2 · Agda.Interaction.Imports
  • Show ModeDefined in Agda-2.8.0.2 · Agda.Interaction.Imports
datadata CheckResult
#

The result and associated parameters of a type-checked file, when invoked directly via interaction or a backend. Note that the constructor is not exported.

valuetypeCheckMain
  1. :: Mode

    Should the file be type-checked, or only scope-checked?

  2. -> Source

    The decorated source code.

  3. -> TCM CheckResult
#

Type checks the main file of the interaction. This could be the file loaded in the interacting editor (emacs), or the file passed on the command line.

First, the primitive modules are imported. Then, getInterface is called to do the main work.

If the Mode is ScopeCheck, then type-checking is not performed, only scope-checking. (This may include type-checking of imported modules.) In this case the generated, partial interface is not stored in the state (stDecodedModules). Note, however, that if the file has already been type-checked, then a complete interface is returned.

valuegetNonMainInterface
  1. :: TopLevelModuleName
  2. -> Maybe Source

    Optional: the source code and some information about the source code.

  3. -> TCM Interface
#

Tries to return the interface associated to the given (imported) module. The time stamp of the relevant interface file is also returned. Calls itself recursively for the imports of the given module. May type check the module. An error is raised if a warning is encountered.

Do not use this for the main file, use typeCheckMain instead.