Moduleghc-9.14.1GHC2021
GHC.Rename.Unbound
- 4 types
- 17 values
- Packageghc-9.14.1
- Exports21
- LanguageGHC2021
- LicenceBSD-3-Clause
- SourceUnbound.hs
Called from the typechecker (GHC.Tc.Errors) when we find an unbound variable
When the name is in scope as field whose selector has been suppressed by NoFieldSelectors, display a helpful message explaining this.
Constructors
WL_AnythingAny sugestion
WL_ConstructorSuggest type constructors, data constructors (including promoted data constructors), and pattern synonyms.
WL_TyConSuggest type constructors/classes only; do not include promoted data constructors.
WL_TyCon_or_TermVarSuggest type constructors and term variables, but not data constructors nor type variables
WL_TyVarSuggest type variables only.
WL_ConLikeSuggest term-level data constructors and pattern synonyms; no type constructors or promoted data constructors
WL_RecFieldSuggest record fields
E.g. in
K { f1 = True, f2 = False }, iff2is not in scope, suggest only constructor fieldsWL_TermSuggest 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_TermVariableSuggest term variables (and record fields)
WL_TypeSuggest types: type constructors, type variables, promoted data constructors.
WL_NoneNo suggestions
This is is used for rebindable syntax, where there is no point in suggesting alternative spellings
Instances2Eq, Show
Eq WhatLookingDefined in ghc-9.14.1 · GHC.Tc.Errors.TypesShow WhatLookingDefined in ghc-9.14.1 · GHC.Tc.Errors.Types
Constructors
Constructors
relevantNameSpace :: Boolis
-XDataKindsenabled?-> WhatLookingwhat are we looking for?
-> NameSpaceis this NameSpace relevant?
-> Bool
Is a NameSpace relevant for what we are looking for?
suggestionIsRelevant :: DynFlagsto find out whether -XDataKinds is enabled
-> WhatLookingWhat kind of name are we looking for?
-> OccName-> Bool
Is it OK to suggest an identifier in some other NameSpace, given what we are looking for?
See Note [Related name spaces]