ghc-8.0.2: The GHC API

Safe Haskell | None
Language | Haskell2010

IfaceEnv

Synopsis

- newGlobalBinder :: Module -> OccName -> SrcSpan -> TcRnIf a b Name
- newInteractiveBinder :: HscEnv -> OccName -> SrcSpan -> IO Name
- externaliseName :: Module -> Name -> TcRnIf m n Name
- lookupIfaceTop :: OccName -> IfL Name
- lookupOrig :: Module -> OccName -> TcRnIf a b Name
- lookupOrigNameCache :: OrigNameCache -> Module -> OccName -> Maybe Name
- extendNameCache :: OrigNameCache -> Module -> OccName -> Name -> OrigNameCache
- newIfaceName :: OccName -> IfL Name
- newIfaceNames :: [OccName] -> IfL [Name]
- extendIfaceIdEnv :: [Id] -> IfL a -> IfL a
- extendIfaceTyVarEnv :: [TyVar] -> IfL a -> IfL a
- tcIfaceLclId :: FastString -> IfL Id
- tcIfaceTyVar :: FastString -> IfL TyVar
- lookupIfaceVar :: IfaceBndr -> IfL (Maybe TyCoVar)
- lookupIfaceTyVar :: IfaceTvBndr -> IfL (Maybe TyVar)
- extendIfaceEnvs :: [TyCoVar] -> IfL a -> IfL a
- ifaceExportNames :: [IfaceExport] -> TcRnIf gbl lcl [AvailInfo]
- allocateGlobalBinder :: NameCache -> Module -> OccName -> SrcSpan -> (NameCache, Name)
- initNameCache :: UniqSupply -> [Name] -> NameCache
- updNameCache :: (NameCache -> (NameCache, c)) -> TcRnIf a b c
- mkNameCacheUpdater :: TcRnIf a b NameCacheUpdater
- newtype NameCacheUpdater = NCU {
  - updateNameCache :: forall c. (NameCache -> (NameCache, c)) -> IO c
  }

# Documentation

newGlobalBinder :: Module -> OccName -> SrcSpan -> TcRnIf a b Name Source #

newInteractiveBinder :: HscEnv -> OccName -> SrcSpan -> IO Name Source #

externaliseName :: Module -> Name -> TcRnIf m n Name Source #

lookupIfaceTop :: OccName -> IfL Name Source #

lookupOrig :: Module -> OccName -> TcRnIf a b Name Source #

Look up the `Name` for a given `Module` and `OccName`. Consider alternately using `lookupIfaceTop` if you're in the `IfL` monad and `Module` is simply that of the `ModIface` you are typechecking.

lookupOrigNameCache :: OrigNameCache -> Module -> OccName -> Maybe Name Source #

extendNameCache :: OrigNameCache -> Module -> OccName -> Name -> OrigNameCache Source #

newIfaceName :: OccName -> IfL Name Source #

newIfaceNames :: [OccName] -> IfL [Name] Source #

extendIfaceIdEnv :: [Id] -> IfL a -> IfL a Source #

extendIfaceTyVarEnv :: [TyVar] -> IfL a -> IfL a Source #

tcIfaceLclId :: FastString -> IfL Id Source #

tcIfaceTyVar :: FastString -> IfL TyVar Source #

lookupIfaceVar :: IfaceBndr -> IfL (Maybe TyCoVar) Source #

lookupIfaceTyVar :: IfaceTvBndr -> IfL (Maybe TyVar) Source #

extendIfaceEnvs :: [TyCoVar] -> IfL a -> IfL a Source #

ifaceExportNames :: [IfaceExport] -> TcRnIf gbl lcl [AvailInfo] Source #

allocateGlobalBinder :: NameCache -> Module -> OccName -> SrcSpan -> (NameCache, Name) Source #

initNameCache :: UniqSupply -> [Name] -> NameCache Source #

updNameCache :: (NameCache -> (NameCache, c)) -> TcRnIf a b c Source #

mkNameCacheUpdater :: TcRnIf a b NameCacheUpdater Source #

Return a function to atomically update the name cache.

newtype NameCacheUpdater Source #

A function that atomically updates the name cache given a modifier function. The second result of the modifier function will be the result of the IO action.

Constructors

NCU |
Fields updateNameCache :: forall c. (NameCache -> (NameCache, c)) -> IO c