HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Moduleghc-9.10.3GHC2021

GHC.Tc.Module

  • 2 types
  • 29 values
  • Packageghc-9.10.3
  • Exports31
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceModule.hs
datadata TcRnExprMode
#

How should we infer a type? See Note [TcRnExprMode]

Constructors

  • TM_Inst

    Instantiate inferred quantifiers only (:type)

  • TM_Default

    Instantiate all quantifiers, and do eager defaulting (:type +d)

Compares the two things for equivalence between boot-file and normal code. Returns Nothing on success or Just "some helpful info for user" failure. If the difference will be apparent to the user, Just empty is perfectly suitable.

For a module modname of type HscSource, determine the list of extra "imports" of other requirements which should be considered part of the import of the requirement, because it transitively depends on those requirements by imports of modules from other packages. The situation is something like this:

unit p where signature X signature Y import X

unit q where dependency p[X=<A>,Y=<B>] signature A signature B

Although q's B does not directly import A, we still have to make sure we process A first, because the merging process will cause B to indirectly import A. This function finds the TRANSITIVE closure of all such imports we need to make.

valuecheckUnit :: Unit -> TcM ()
#

Given a Unit, make sure it is well typed. This is because unit IDs come from Cabal, which does not know if things are well-typed or not; a component may have been filled with implementations for the holes that don't actually fulfill the requirements.