Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- data HscEnvEq
- hscEnv :: HscEnvEq -> HscEnv
- newHscEnvEq :: FilePath -> HscEnv -> [(UnitId, DynFlags)] -> IO HscEnvEq
- hscEnvWithImportPaths :: HscEnvEq -> HscEnv
- newHscEnvEqPreserveImportPaths :: HscEnv -> [(UnitId, DynFlags)] -> IO HscEnvEq
- newHscEnvEqWithImportPaths :: Maybe (Set FilePath) -> HscEnv -> [(UnitId, DynFlags)] -> IO HscEnvEq
- updateHscEnvEq :: HscEnvEq -> HscEnv -> IO HscEnvEq
- envImportPaths :: HscEnvEq -> Maybe (Set FilePath)
- envPackageExports :: HscEnvEq -> IO ExportsMap
- envVisibleModuleNames :: HscEnvEq -> IO (Maybe [ModuleName])
- deps :: HscEnvEq -> [(UnitId, DynFlags)]
Documentation
An HscEnv
with equality. Two values are considered equal
if they are created with the same call to newHscEnvEq
or
updateHscEnvEq
.
hscEnvWithImportPaths :: HscEnvEq -> HscEnv Source #
Unwrap the HscEnv
with the original import paths.
Used only for locating imports
newHscEnvEqWithImportPaths :: Maybe (Set FilePath) -> HscEnv -> [(UnitId, DynFlags)] -> IO HscEnvEq Source #
envImportPaths :: HscEnvEq -> Maybe (Set FilePath) Source #
If Just, import dirs originally configured in this env If Nothing, the env import dirs are unaltered
envPackageExports :: HscEnvEq -> IO ExportsMap Source #
envVisibleModuleNames :: HscEnvEq -> IO (Maybe [ModuleName]) Source #
listVisibleModuleNames
is a pure function,
but it could panic due to a ghc bug: https://github.com/haskell/haskell-language-server/issues/1365
So it's wrapped in IO here for error handling
If Nothing, listVisibleModuleNames
panic