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

GHC 9.14.1 · lts/ghc-9.14.x · 3e2d568 · 2026-10-11

ModuleAgda-2.8.0.2Haskell2010

Agda.Interaction.FindFile

Functions which map between module names and file names.

Note that file name lookups are cached in the TCState. The code assumes that no Agda source files are added or removed from the include directories while the code is being type checked.

  • 3 types
  • 16 values
  • PackageAgda-2.8.0.2
  • Exports19
  • LanguageHaskell2010
  • LicenceMIT
  • SourceFindFile.hs
newtypenewtype SourceFile
#

SourceFiles must exist and be registered in our file dictionary.

Instances6Eq, Ord, Show, Generic, NFData, Rep
valuemkInterfaceFile
  1. :: AbsolutePath

    Path to the candidate interface file

  2. -> IO (Maybe InterfaceFile)

    Interface file iff it exists

#

Makes an interface file from an AbsolutePath candidate. If the file does not exist, then fail by returning Nothing.

datadata FindError
#

Errors which can arise when trying to find a source file.

Invariant: All paths are absolute.

Constructors

Instances1Show
  • Show FindErrorDefined in Agda-2.8.0.2 · Agda.Interaction.FindFile

Finds the source file corresponding to a given top-level module name. The returned paths are absolute.

Raises an error if the file cannot be found.

valuecheckModuleName
  1. :: TopLevelModuleName

    The name of the module.

  2. -> SourceFile

    The file from which it was loaded.

  3. -> Maybe TopLevelModuleName

    The expected name, coming from an import statement.

  4. -> TCM ()
#

Ensures that the module name matches the file name. The file corresponding to the module name (according to the include path) has to be the same as the given file name.