2013-08-26 16:28:21 +00:00
|
|
|
-- | Low level access to the ghc-mod library.
|
|
|
|
|
2017-05-28 02:22:56 +00:00
|
|
|
module GhcMod.Exe.Internal (
|
2013-09-16 00:56:08 +00:00
|
|
|
-- * Types
|
2014-04-28 12:43:24 +00:00
|
|
|
GHCOption
|
2013-09-16 00:56:08 +00:00
|
|
|
, IncludeDir
|
2015-06-07 18:36:49 +00:00
|
|
|
, GmlT(..)
|
|
|
|
, MonadIO(..)
|
|
|
|
, GmEnv(..)
|
2014-09-18 08:05:47 +00:00
|
|
|
-- * Various Paths
|
2014-07-12 01:30:06 +00:00
|
|
|
, ghcLibDir
|
2014-09-18 08:05:47 +00:00
|
|
|
, ghcModExecutable
|
2014-04-28 04:52:28 +00:00
|
|
|
-- * Logging
|
2014-04-26 08:54:15 +00:00
|
|
|
, withLogger
|
2014-08-19 08:18:36 +00:00
|
|
|
, setNoWarningFlags
|
|
|
|
, setAllWarningFlags
|
2014-07-18 06:42:05 +00:00
|
|
|
-- * Environment, state and logging
|
|
|
|
, GhcModEnv(..)
|
|
|
|
, GhcModState
|
2014-07-22 17:45:48 +00:00
|
|
|
, GhcModLog
|
2015-06-07 18:36:49 +00:00
|
|
|
, GmLog(..)
|
|
|
|
, GmLogLevel(..)
|
|
|
|
, gmSetLogLevel
|
2014-07-18 06:42:05 +00:00
|
|
|
-- * Monad utilities
|
|
|
|
, runGhcModT'
|
2014-08-28 09:54:01 +00:00
|
|
|
, hoistGhcModT
|
2015-06-07 18:36:49 +00:00
|
|
|
, runGmlT
|
|
|
|
, runGmlT'
|
|
|
|
, gmlGetSession
|
|
|
|
, gmlSetSession
|
|
|
|
, loadTargets
|
|
|
|
, cabalResolvedComponents
|
2014-07-18 06:42:05 +00:00
|
|
|
-- ** Accessing 'GhcModEnv' and 'GhcModState'
|
|
|
|
, options
|
|
|
|
, cradle
|
2015-08-18 08:54:55 +00:00
|
|
|
, targetGhcOptions
|
2014-07-18 06:42:05 +00:00
|
|
|
, withOptions
|
2014-09-18 08:05:47 +00:00
|
|
|
-- * 'GhcModError'
|
|
|
|
, gmeDoc
|
2014-09-23 08:34:09 +00:00
|
|
|
-- * World
|
|
|
|
, World
|
2014-09-23 12:28:03 +00:00
|
|
|
, getCurrentWorld
|
2014-11-01 21:02:47 +00:00
|
|
|
, didWorldChange
|
2015-06-07 18:36:49 +00:00
|
|
|
-- * Cabal Helper
|
|
|
|
, ModulePath(..)
|
|
|
|
, GmComponent(..)
|
|
|
|
, GmComponentType(..)
|
|
|
|
, GmModuleGraph(..)
|
2015-08-14 01:48:29 +00:00
|
|
|
, prepareCabalHelper
|
2015-08-14 03:57:33 +00:00
|
|
|
-- * Misc stuff
|
|
|
|
, GHandler(..)
|
|
|
|
, gcatches
|
2015-05-31 08:32:46 +00:00
|
|
|
-- * FileMapping
|
2017-05-28 02:22:56 +00:00
|
|
|
, module GhcMod.FileMapping
|
2013-08-26 16:28:21 +00:00
|
|
|
) where
|
|
|
|
|
2014-07-12 01:30:06 +00:00
|
|
|
import GHC.Paths (libdir)
|
|
|
|
|
2017-05-28 02:22:56 +00:00
|
|
|
import GhcMod.Target
|
|
|
|
import GhcMod.DynFlags
|
|
|
|
import GhcMod.Error
|
|
|
|
import GhcMod.Logger
|
|
|
|
import GhcMod.Logging
|
|
|
|
import GhcMod.Monad
|
|
|
|
import GhcMod.Types
|
|
|
|
import GhcMod.Utils
|
|
|
|
import GhcMod.World
|
|
|
|
import GhcMod.CabalHelper
|
|
|
|
import GhcMod.FileMapping
|
2014-07-12 01:30:06 +00:00
|
|
|
|
|
|
|
-- | Obtaining the directory for ghc system libraries.
|
|
|
|
ghcLibDir :: FilePath
|
|
|
|
ghcLibDir = libdir
|