ghc-9.6.3: The GHC API

Safe Haskell | Safe-Inferred
Language | Haskell2010

GHC.Rename.Unbound

Synopsis

- mkUnboundName :: OccName -> Name
- mkUnboundNameRdr :: RdrName -> Name
- isUnboundName :: Name -> Bool
- reportUnboundName :: RdrName -> RnM Name
- reportUnboundName' :: WhatLooking -> RdrName -> RnM Name
- unknownNameSuggestions :: WhatLooking -> DynFlags -> HomePackageTable -> Module -> GlobalRdrEnv -> LocalRdrEnv -> ImportAvails -> RdrName -> ([ImportError], [GhcHint])
- data WhatLooking
  - = WL_Anything
  - | WL_Constructor
  - | WL_RecField
  - | WL_None
- data WhereLooking
  - = WL_Anywhere
  - | WL_Global
  - | WL_LocalTop
  - | WL_LocalOnly
- data LookingFor = LF {
  - lf_which :: WhatLooking
  - lf_where :: WhereLooking
  }
- unboundName :: LookingFor -> RdrName -> RnM Name
- unboundNameX :: LookingFor -> RdrName -> [GhcHint] -> RnM Name
- notInScopeErr :: WhereLooking -> RdrName -> NotInScopeError
- nameSpacesRelated :: DynFlags -> WhatLooking -> NameSpace -> NameSpace -> Bool

# Documentation

mkUnboundName :: OccName -> Name Source #

mkUnboundNameRdr :: RdrName -> Name Source #

isUnboundName :: Name -> Bool Source #

reportUnboundName :: RdrName -> RnM Name Source #

reportUnboundName' :: WhatLooking -> RdrName -> RnM Name Source #

unknownNameSuggestions :: WhatLooking -> DynFlags -> HomePackageTable -> Module -> GlobalRdrEnv -> LocalRdrEnv -> ImportAvails -> RdrName -> ([ImportError], [GhcHint]) Source #

Called from the typechecker (GHC.Tc.Errors) when we find an unbound variable

data WhatLooking Source #

Constructors

WL_Anything |
WL_Constructor |
WL_RecField |
WL_None |

#### Instances

Instances details

Eq WhatLooking Source # |
Instance details Defined in GHC.Rename.Unbound Methods (==) :: WhatLooking -> WhatLooking -> Bool # (/=) :: WhatLooking -> WhatLooking -> Bool #

data WhereLooking Source #

Constructors

WL_Anywhere |
WL_Global |
WL_LocalTop |
WL_LocalOnly |

data LookingFor Source #

Constructors

LF |

Fields

- lf_which :: WhatLooking
- lf_where :: WhereLooking

unboundName :: LookingFor -> RdrName -> RnM Name Source #

unboundNameX :: LookingFor -> RdrName -> [GhcHint] -> RnM Name Source #

notInScopeErr :: WhereLooking -> RdrName -> NotInScopeError Source #

nameSpacesRelated Source #

Arguments

:: DynFlags | to find out whether -XDataKinds is enabled
-> WhatLooking | What kind of name are we looking for
-> NameSpace | Name space of the original name
-> NameSpace | Name space of a name that might have been meant
-> Bool |