ghc-8.2.2: The GHC API

Safe HaskellNone
LanguageHaskell2010

RnEnv

Synopsis

Documentation

lookupOccRn_overloaded :: Bool -> RdrName -> RnM (Maybe (Either Name [FieldOcc 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.

lookupExactOcc :: Name -> RnM Name Source #

Lookup an Exact RdrName. See Note [Looking up Exact RdrNames]. This adds an error if the name cannot be found.

unknownNameSuggestions :: DynFlags -> GlobalRdrEnv -> LocalRdrEnv -> ImportAvails -> RdrName -> SDoc Source #

Called from the typechecker (TcErrors) when we find an unbound variable

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

lookupFixityRn_help :: Name -> RnM (Bool, Fixity) Source #

lookupFixityRn_help returns (True, fixity) if it finds a Fixity in a local environment or from an interface file. Otherwise, it returns (False, fixity) (e.g., for unbound Names or Names without user-supplied fixity declarations).

lookupFieldFixityRn :: AmbiguousFieldOcc Name -> RnM Fixity Source #

Look up the fixity of a (possibly ambiguous) occurrence of a record field selector. We use lookupFixityRn' so that we can specifiy the OccName as the field label, which might be different to the OccName of the selector Name if DuplicateRecordFields is in use (Trac #1173). If there are multiple possible selectors with different fixities, generate an error.

lookupSyntaxName' Source #

Arguments

:: Name

The standard name

-> RnM Name

Possibly a non-standard name

dupNamesErr :: Outputable n => (n -> SrcSpan) -> [n] -> RnM () Source #

addFvRn :: FreeVars -> RnM (thing, FreeVars) -> RnM (thing, FreeVars) Source #

mapFvRn :: (a -> RnM (b, FreeVars)) -> [a] -> RnM ([b], FreeVars) Source #

mapMaybeFvRn :: (a -> RnM (b, FreeVars)) -> Maybe a -> RnM (Maybe b, FreeVars) Source #

mapFvRnCPS :: (a -> (b -> RnM c) -> RnM c) -> [a] -> ([b] -> RnM c) -> RnM c Source #

mkFieldEnv :: GlobalRdrEnv -> NameEnv (FieldLabelString, Name) Source #

Make a map from selector names to field labels and parent tycon names, to be used when reporting unused record fields.