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

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8174fa4 · 2026-10-11

Moduleghc-10.0.0.20260917GHC2024

GHC.Unit.Finder

Module finder

  • 4 types
  • 18 values
datadata FindResult
#

The result of searching for an imported module.

NB: FindResult manages both user source-import lookups (which can result in Module) as well as direct imports for interfaces (which always result in InstalledModule).

Constructors

datadata FinderOpts
#

Locations and information the finder cares about.

Should be taken from DynFlags via initFinderOpts.

Constructors

datadata FinderCache
#

Constructors

Locate a module that was imported by the user. We have the module's name, and possibly a package name. Without a package name, this function will use the search path and the known exposed packages to find the module, if a package is specified then only that package is searched for the module.

Compute the file name of a header file for foreign stubs, using either the directory explicitly specified in the command line option -stubdir, or the directory of the module's source file.

When compiling bytecode from interface Core bindings, ModLocation does not contain a source file path, so the header isn't written. This doesn't have an impact, since we cannot support headers importing Haskell symbols defined in bytecode for TH whatsoever at the moment.

This function computes a shallow hash of a directory, so really just what files and directories are directly inside it. It does not look at the contents of the files, or the contents of the directories it contains.