ghcide-2.7.0.0: The core of an IDE

Safe Haskell | None
Language | GHC2021

Development.IDE.Types.HscEnvEq

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

data HscEnvEq #

An `HscEnv` with equality. Two values are considered equal if they are created with the same call to `newHscEnvEq` or `updateHscEnvEq`.

#### Instances

Instances details

Show HscEnvEq # |
Instance details Defined in Development.IDE.Types.HscEnvEq Methods showsPrec :: Int -> HscEnvEq -> ShowS # show :: HscEnvEq -> String # showList :: [HscEnvEq] -> ShowS #
NFData HscEnvEq # |
Instance details Defined in Development.IDE.Types.HscEnvEq Methods rnf :: HscEnvEq -> () #
Eq HscEnvEq # |
Instance details Defined in Development.IDE.Types.HscEnvEq Methods (==) :: HscEnvEq -> HscEnvEq -> Bool # (/=) :: HscEnvEq -> HscEnvEq -> Bool #
Hashable HscEnvEq # |
Instance details Defined in Development.IDE.Types.HscEnvEq Methods hashWithSalt :: Int -> HscEnvEq -> Int # hash :: HscEnvEq -> Int #

hscEnv :: HscEnvEq -> HscEnv #

newHscEnvEq :: FilePath -> HscEnv -> [(UnitId, DynFlags)] -> IO HscEnvEq #

Wrap an `HscEnv` into an `HscEnvEq`.

hscEnvWithImportPaths :: HscEnvEq -> HscEnv #

Unwrap the `HscEnv` with the original import paths. Used only for locating imports

newHscEnvEqPreserveImportPaths :: HscEnv -> [(UnitId, DynFlags)] -> IO HscEnvEq #

Wrap an `HscEnv` into an `HscEnvEq`.

newHscEnvEqWithImportPaths :: Maybe (Set FilePath) -> HscEnv -> [(UnitId, DynFlags)] -> IO HscEnvEq #

updateHscEnvEq :: HscEnvEq -> HscEnv -> IO HscEnvEq #

envImportPaths :: HscEnvEq -> Maybe (Set FilePath) #

If Just, import dirs originally configured in this env If Nothing, the env import dirs are unaltered

envPackageExports :: HscEnvEq -> IO ExportsMap #

envVisibleModuleNames :: HscEnvEq -> IO (Maybe [ModuleName]) #

`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

deps :: HscEnvEq -> [(UnitId, DynFlags)] #

In memory components for this HscEnv This is only used at the moment for the import dirs in the DynFlags