Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data HscEnvEq
- hscEnv :: HscEnvEq -> HscEnv
- newHscEnvEq :: FilePath -> HscEnv -> [(InstalledUnitId, DynFlags)] -> IO HscEnvEq
- hscEnvWithImportPaths :: HscEnvEq -> HscEnv
- newHscEnvEqPreserveImportPaths :: HscEnv -> [(InstalledUnitId, DynFlags)] -> IO HscEnvEq
- newHscEnvEqWithImportPaths :: Maybe (Set FilePath) -> HscEnv -> [(InstalledUnitId, DynFlags)] -> IO HscEnvEq
- envImportPaths :: HscEnvEq -> Maybe (Set FilePath)
- envPackageExports :: HscEnvEq -> IO ExportsMap
- envVisibleModuleNames :: HscEnvEq -> IO (Maybe [ModuleName])
- deps :: HscEnvEq -> [(InstalledUnitId, DynFlags)]
Documentation
An HscEnv
with equality. Two values are considered equal
if they are created with the same call to newHscEnvEq
.
newHscEnvEq :: FilePath -> HscEnv -> [(InstalledUnitId, DynFlags)] -> IO HscEnvEq Source #
hscEnvWithImportPaths :: HscEnvEq -> HscEnv Source #
Unwrap the HscEnv
with the original import paths.
Used only for locating imports
newHscEnvEqPreserveImportPaths :: HscEnv -> [(InstalledUnitId, DynFlags)] -> IO HscEnvEq Source #
newHscEnvEqWithImportPaths :: Maybe (Set FilePath) -> HscEnv -> [(InstalledUnitId, 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