ghc-8.2.2: The GHC API

Safe Haskell | None
Language | Haskell2010

RnNames

Synopsis

- rnImports :: [LImportDecl RdrName] -> RnM ([LImportDecl Name], GlobalRdrEnv, ImportAvails, AnyHpcUsage)
- getLocalNonValBinders :: MiniFixityEnv -> HsGroup RdrName -> RnM ((TcGblEnv, TcLclEnv), NameSet)
- newRecordSelector :: Bool -> [Name] -> LFieldOcc RdrName -> RnM FieldLabel
- extendGlobalRdrEnvRn :: [AvailInfo] -> MiniFixityEnv -> RnM (TcGblEnv, TcLclEnv)
- gresFromAvails :: Maybe ImportSpec -> [AvailInfo] -> [GlobalRdrElt]
- calculateAvails :: DynFlags -> ModIface -> IsSafeImport -> IsBootInterface -> ImportedBy -> ImportAvails
- reportUnusedNames :: Maybe (Located [LIE RdrName]) -> TcGblEnv -> RnM ()
- checkConName :: RdrName -> TcRn ()
- mkChildEnv :: [GlobalRdrElt] -> NameEnv [GlobalRdrElt]
- findChildren :: NameEnv [a] -> Name -> [a]
- dodgyMsg :: (OutputableBndr n, HasOccName n) => SDoc -> n -> SDoc

# Documentation

rnImports :: [LImportDecl RdrName] -> RnM ([LImportDecl Name], GlobalRdrEnv, ImportAvails, AnyHpcUsage) #

Process Import Decls. See `rnImportDecl` for a description of what the return types represent. Note: Do the non SOURCE ones first, so that we get a helpful warning for SOURCE ones that are unnecessary

getLocalNonValBinders :: MiniFixityEnv -> HsGroup RdrName -> RnM ((TcGblEnv, TcLclEnv), NameSet) #

newRecordSelector :: Bool -> [Name] -> LFieldOcc RdrName -> RnM FieldLabel #

extendGlobalRdrEnvRn :: [AvailInfo] -> MiniFixityEnv -> RnM (TcGblEnv, TcLclEnv) #

gresFromAvails :: Maybe ImportSpec -> [AvailInfo] -> [GlobalRdrElt] #

make a `GlobalRdrEnv` where all the elements point to the same Provenance (useful for "hiding" imports, or imports with no details).

calculateAvails :: DynFlags -> ModIface -> IsSafeImport -> IsBootInterface -> ImportedBy -> ImportAvails #

Calculate the `ImportAvails` induced by an import of a particular interface, but without `imp_mods`.

reportUnusedNames :: Maybe (Located [LIE RdrName]) -> TcGblEnv -> RnM () #

checkConName :: RdrName -> TcRn () #

mkChildEnv :: [GlobalRdrElt] -> NameEnv [GlobalRdrElt] #

findChildren :: NameEnv [a] -> Name -> [a] #

dodgyMsg :: (OutputableBndr n, HasOccName n) => SDoc -> n -> SDoc #