ghcide-1.6.0.0: The core of an IDE
Safe HaskellNone
LanguageHaskell2010

Development.IDE.GHC.Compat.Units

Description

Compat module for UnitState and UnitInfo.

Synopsis

UnitState

preloadClosureUs :: HscEnv -> PreloadUnitClosure Source #

data LookupResult #

The result of performing a lookup

Constructors

LookupFound Module PackageConfig

Found the module uniquely, nothing else to do

LookupMultiple [(Module, ModuleOrigin)]

Multiple modules with the same name in scope

LookupHidden [(Module, ModuleOrigin)] [(Module, ModuleOrigin)]

No modules found, but there were some hidden ones with an exact name match. First is due to package hidden, second is due to module being hidden

LookupUnusable [(Module, ModuleOrigin)]

No modules found, but there were some unusable ones with an exact name match

LookupNotFound [ModuleSuggestion]

Nothing found, here are some suggested different names

UnitInfoMap

lookupUnit' :: Bool -> UnitInfoMap -> PreloadUnitClosure -> Unit -> Maybe UnitInfo Source #

UnitInfo

UnitId helpers

data UnitId #

A unit identifier identifies a (possibly partially) instantiated library. It is primarily used as part of Module, which in turn is used in Name, which is used to give names to entities when typechecking.

There are two possible forms for a UnitId. It can be a DefiniteUnitId, in which case we just have a string that uniquely identifies some fully compiled, installed library we have on disk. However, when we are typechecking a library with missing holes, we may need to instantiate a library on the fly (in which case we don't have any on-disk representation.) In that case, you have an IndefiniteUnitId, which explicitly records the instantiation, so that we can substitute over it.

Instances

Instances details
Eq UnitId 
Instance details

Defined in Module

Methods

(==) :: UnitId -> UnitId -> Bool #

(/=) :: UnitId -> UnitId -> Bool #

Data UnitId 
Instance details

Defined in Module

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UnitId -> c UnitId #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UnitId #

toConstr :: UnitId -> Constr #

dataTypeOf :: UnitId -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c UnitId) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UnitId) #

gmapT :: (forall b. Data b => b -> b) -> UnitId -> UnitId #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UnitId -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UnitId -> r #

gmapQ :: (forall d. Data d => d -> u) -> UnitId -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> UnitId -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> UnitId -> m UnitId #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UnitId -> m UnitId #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UnitId -> m UnitId #

Ord UnitId 
Instance details

Defined in Module

Show UnitId 
Instance details

Defined in Module

NFData UnitId 
Instance details

Defined in Module

Methods

rnf :: UnitId -> () #

Binary UnitId 
Instance details

Defined in Module

Methods

put_ :: BinHandle -> UnitId -> IO () #

put :: BinHandle -> UnitId -> IO (Bin UnitId) #

get :: BinHandle -> IO UnitId #

Uniquable UnitId 
Instance details

Defined in Module

Methods

getUnique :: UnitId -> Unique #

Outputable UnitId 
Instance details

Defined in Module

Methods

ppr :: UnitId -> SDoc #

pprPrec :: Rational -> UnitId -> SDoc #

DbUnitIdModuleRep InstalledUnitId ComponentId UnitId ModuleName Module 
Instance details

Defined in Module

Module

ExternalPackageState

data ExternalPackageState #

Information about other packages that we have slurped in by reading their interface files

Constructors

EPS 

Fields

Utils

type FinderCache = InstalledModuleEnv InstalledFindResult #

The FinderCache maps modules to the result of searching for that module. It records the results of searching for modules along the search path. On :load, we flush the entire contents of this cache.