ghc-lib-0.20201101: The GHC API, decoupled from GHC versions
Safe HaskellNone
LanguageHaskell2010

GHC.Rename.Env

Synopsis

Documentation

lookupLocalOccThLvl_maybe :: Name -> RnM (Maybe (TopLevelFlag, ThLevel)) Source #

lookupGlobalOccRn_overloaded :: Bool -> RdrName -> RnM (Maybe (Either Name [Name])) Source #

Like lookupOccRn_maybe, but with a more informative result if the RdrName happens to be a record selector:

  • Nothing -> name not in scope (no error reported)
  • Just (Left x) -> name uniquely refers to x, or there is a name clash (reported)
  • Just (Right xs) -> name refers to one or more record selectors; if overload_ok was False, this list will be a singleton.

data ChildLookupResult Source #

Constructors

NameNotFound 
IncorrectParent Name Name SDoc [Name] 
FoundName Parent Name 
FoundFL FieldLabel 

Instances

Instances details
Outputable ChildLookupResult Source # 
Instance details

Defined in GHC.Rename.Env

Methods

ppr :: ChildLookupResult -> SDoc

lookupSubBndrOcc_helper :: Bool -> Bool -> Name -> RdrName -> RnM ChildLookupResult Source #

Used in export lists to lookup the children.

combineChildLookupResult :: [RnM ChildLookupResult] -> RnM ChildLookupResult Source #

Specialised version of msum for RnM ChildLookupResult

data HsSigCtxt Source #

Constructors

TopSigCtxt NameSet 
LocalBindCtxt NameSet 
ClsDeclCtxt Name 
InstDeclCtxt NameSet 
HsBootCtxt NameSet 
RoleAnnotCtxt NameSet 

Instances

Instances details
Outputable HsSigCtxt Source # 
Instance details

Defined in GHC.Rename.Env

Methods

ppr :: HsSigCtxt -> SDoc

lookupSigCtxtOccRn Source #

Arguments

:: HsSigCtxt 
-> SDoc

description of thing we're looking up, like "type family"

-> Located RdrName 
-> RnM (Located Name) 

Lookup a name in relation to the names in a HsSigCtxt

lookupRecFieldOcc :: Maybe Name -> RdrName -> RnM Name Source #

Look up an occurrence of a field in record construction or pattern matching (but not update). When the -XDisambiguateRecordFields flag is on, take account of the data constructor name to disambiguate which field to use.

See Note [DisambiguateRecordFields].

lookupConstructorFields :: Name -> RnM [FieldLabel] Source #

lookupGreAvailRn :: RdrName -> RnM (Name, AvailInfo) Source #

lookupSyntax :: Name -> RnM (SyntaxExpr GhcRn, FreeVars) Source #

lookupSyntaxExpr Source #

Arguments

:: Name

The standard name

-> RnM (HsExpr GhcRn, FreeVars)

Possibly a non-standard name

lookupSyntaxName Source #

Arguments

:: Name

The standard name

-> RnM (Name, FreeVars)

Possibly a non-standard name

lookupSyntaxNames :: [Name] -> RnM ([HsExpr GhcRn], FreeVars) Source #

lookupIfThenElse :: Bool -> RnM (SyntaxExpr GhcRn, FreeVars) Source #

lookupReboundIf :: RnM (Maybe (Located Name)) Source #

Lookup an ifThenElse binding (see lookupRebound).

lookupQualifiedDoExpr :: HsStmtContext p -> Name -> RnM (HsExpr GhcRn, FreeVars) Source #

lookupQualifiedDo :: HsStmtContext p -> Name -> RnM (SyntaxExpr GhcRn, FreeVars) Source #

lookupQualifiedDoName :: HsStmtContext p -> Name -> RnM (Name, FreeVars) Source #

addUsedGRE :: Bool -> GlobalRdrElt -> RnM () Source #

addUsedGREs :: [GlobalRdrElt] -> RnM () Source #

addUsedDataCons :: GlobalRdrEnv -> TyCon -> RnM () Source #