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.Rename.Unbound

  • 4 types
  • 22 values

Provide import suggestions, without filtering by module qualification. Used to suggest imports for HasField, which doesn't care about whether a name is imported qualified or unqualified.

For example:

import M1 () -- M1 exports fld1
import qualified M2 hiding ( fld2 )
x r = r.fld1              -- suggest adding 'fld1' to M1 import
y r = getField @"fld2" r  -- suggest unhiding 'fld' from M2 import
datadata WhatLooking
#

Constructors

  • WL_Anything

    Any sugestion

  • WL_Constructor

    Suggest type constructors, data constructors (including promoted data constructors), and pattern synonyms.

  • WL_TyCon

    Suggest type constructors/classes only; do not include promoted data constructors.

  • WL_TyCon_or_TermVar

    Suggest type constructors and term variables, but not data constructors nor type variables

  • WL_TyVar

    Suggest type variables only.

  • WL_ConLike

    Suggest term-level data constructors and pattern synonyms; no type constructors or promoted data constructors

  • WL_RecField

    Suggest record fields

    E.g. in K { f1 = True, f2 = False }, if f2 is not in scope, suggest only constructor fields

  • WL_Term

    Suggest terms

    If we are expecting a term value, then only suggest terms (e.g. term variables, data constructors) and not type constructors or type variables

  • WL_TermVariable

    Suggest term variables (and record fields)

  • WL_Type

    Suggest types: type constructors, type variables, promoted data constructors.

  • WL_None

    No suggestions

    This is is used for rebindable syntax, where there is no point in suggesting alternative spellings

Instances2Eq, Show
valuesuggestionIsRelevant
  1. :: DynFlags

    to find out whether -XDataKinds is enabled

  2. -> WhatLooking

    What kind of name are we looking for?

  3. -> OccName

    The suggestion

    We only look at the suggestion's NameSpace, but passing the whole OccName is convenient for debugging.

  4. -> Bool
#

Is it OK to suggest an identifier in some other NameSpace, given what we are looking for?

See Note [Related name spaces]