ghcide-2.4.0.0: The core of an IDE

Safe Haskell | Safe-Inferred
Language | Haskell2010

Development.IDE.GHC.Compat.Env

Contents

- HomeUnit
- Provide backwards Compatible
- Home Unit
- DynFlags Helper
- Ways
- Backend, backwards compatible

Description

Compat module for the main Driver types, such as `HscEnv`, `UnitEnv` and some DynFlags compat functions.

Synopsis

- data HscEnv
- hsc_HPT :: HscEnv -> HomePackageTable
- data InteractiveContext = InteractiveContext {
  - ic_dflags :: DynFlags
  - ic_mod_index :: Int
  - ic_imports :: [InteractiveImport]
  - ic_tythings :: [TyThing]
  - ic_gre_cache :: IcGlobalRdrEnv
  - ic_instances :: (InstEnv, [FamInst])
  - ic_fix_env :: FixityEnv
  - ic_default :: Maybe [Type]
  - ic_resume :: [Resume]
  - ic_monad :: Name
  - ic_int_print :: Name
  - ic_cwd :: Maybe FilePath
  - ic_plugins :: !Plugins
  }
- setInteractivePrintName :: InteractiveContext -> Name -> InteractiveContext
- setInteractiveDynFlags :: GhcMonad m => DynFlags -> m ()
- hsc_dflags :: HscEnv -> DynFlags
- hsc_EPS :: HscEnv -> UnitEnv
- hsc_logger :: HscEnv -> Logger
- hsc_tmpfs :: HscEnv -> TmpFs
- hsc_unit_env :: HscEnv -> UnitEnv
- hsc_hooks :: HscEnv -> Hooks
- hscSetHooks :: Hooks -> HscEnv -> HscEnv
- data TmpFs
- hscHomeUnit :: HscEnv -> HomeUnit
- type HomeUnit = GenHomeUnit UnitId
- setHomeUnitId_ :: UnitId -> DynFlags -> DynFlags
- mkHomeModule :: HomeUnit -> ModuleName -> Module
- data Logger
- data UnitEnv
- hscSetUnitEnv :: UnitEnv -> HscEnv -> HscEnv
- hscSetFlags :: DynFlags -> HscEnv -> HscEnv
- initTempFs :: HscEnv -> IO HscEnv
- homeUnitId_ :: DynFlags -> UnitId
- setBytecodeLinkerOptions :: DynFlags -> DynFlags
- setInterpreterLinkerOptions :: DynFlags -> DynFlags
- safeImportsOn :: DynFlags -> Bool
- type Ways = Set Way
- data Way
- hostFullWays :: Ways
- setWays :: Ways -> DynFlags -> DynFlags
- wayGeneralFlags :: Platform -> Way -> [GeneralFlag]
- wayUnsetGeneralFlags :: Platform -> Way -> [GeneralFlag]
- data Backend
- setBackend :: Backend -> DynFlags -> DynFlags
- ghciBackend :: Backend
- platformDefaultBackend :: DynFlags -> Backend

# Documentation

data HscEnv #

#### Instances

Instances details

ContainsDynFlags HscEnv |
Instance details Defined in GHC.Driver.Env.Types Methods extractDynFlags :: HscEnv -> DynFlags

hsc_HPT :: HscEnv -> HomePackageTable #

data InteractiveContext #

Constructors

InteractiveContext |
Fields ic_dflags :: DynFlags ic_mod_index :: Int ic_imports :: [InteractiveImport] ic_tythings :: [TyThing] ic_gre_cache :: IcGlobalRdrEnv ic_instances :: (InstEnv, [FamInst]) ic_fix_env :: FixityEnv ic_default :: Maybe [Type] ic_resume :: [Resume] ic_monad :: Name ic_int_print :: Name ic_cwd :: Maybe FilePath ic_plugins :: !Plugins

setInteractivePrintName :: InteractiveContext -> Name -> InteractiveContext #

setInteractiveDynFlags :: GhcMonad m => DynFlags -> m () #

hsc_dflags :: HscEnv -> DynFlags #

hsc_EPS :: HscEnv -> UnitEnv #

hsc_logger :: HscEnv -> Logger #

hsc_tmpfs :: HscEnv -> TmpFs #

hsc_unit_env :: HscEnv -> UnitEnv #

hsc_hooks :: HscEnv -> Hooks #

hscSetHooks :: Hooks -> HscEnv -> HscEnv #

data TmpFs #

# HomeUnit

hscHomeUnit :: HscEnv -> HomeUnit #

type HomeUnit = GenHomeUnit UnitId #

setHomeUnitId_ :: UnitId -> DynFlags -> DynFlags #

mkHomeModule :: HomeUnit -> ModuleName -> Module #

# Provide backwards Compatible

data Logger #

data UnitEnv #

hscSetUnitEnv :: UnitEnv -> HscEnv -> HscEnv #

hscSetFlags :: DynFlags -> HscEnv -> HscEnv #

initTempFs :: HscEnv -> IO HscEnv #

# Home Unit

homeUnitId_ :: DynFlags -> UnitId #

# DynFlags Helper

setBytecodeLinkerOptions :: DynFlags -> DynFlags #

We don't want to generate object code so we compile to bytecode (HscInterpreted) which implies LinkInMemory HscInterpreted

setInterpreterLinkerOptions :: DynFlags -> DynFlags #

safeImportsOn :: DynFlags -> Bool #

# Ways

type Ways = Set Way #

data Way #

#### Instances

Instances details

Read Way |
Instance details Defined in GHC.Platform.Ways Methods readsPrec :: Int -> ReadS Way # readList :: ReadS [Way] # readPrec :: ReadPrec Way # readListPrec :: ReadPrec [Way] #
Show Way |
Instance details Defined in GHC.Platform.Ways Methods showsPrec :: Int -> Way -> ShowS # show :: Way -> String # showList :: [Way] -> ShowS #
Eq Way |
Instance details Defined in GHC.Platform.Ways Methods (==) :: Way -> Way -> Bool # (/=) :: Way -> Way -> Bool #
Ord Way |
Instance details Defined in GHC.Platform.Ways Methods compare :: Way -> Way -> Ordering (<) :: Way -> Way -> Bool (<=) :: Way -> Way -> Bool (>) :: Way -> Way -> Bool (>=) :: Way -> Way -> Bool max :: Way -> Way -> Way min :: Way -> Way -> Way

hostFullWays :: Ways #

setWays :: Ways -> DynFlags -> DynFlags #

wayGeneralFlags :: Platform -> Way -> [GeneralFlag] #

wayUnsetGeneralFlags :: Platform -> Way -> [GeneralFlag] #

# Backend, backwards compatible

data Backend #

#### Instances

Instances details

Show Backend |
Instance details Defined in GHC.Driver.Backend Methods showsPrec :: Int -> Backend -> ShowS # show :: Backend -> String # showList :: [Backend] -> ShowS #

setBackend :: Backend -> DynFlags -> DynFlags #

ghciBackend :: Backend #

platformDefaultBackend :: DynFlags -> Backend #