2013-08-26 16:28:21 +00:00
|
|
|
-- | Low level access to the ghc-mod library.
|
|
|
|
|
|
|
|
module Language.Haskell.GhcMod.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
|
|
|
, Package
|
2014-04-24 03:17:50 +00:00
|
|
|
, PackageBaseName
|
|
|
|
, PackageVersion
|
|
|
|
, PackageId
|
2013-09-16 00:56:08 +00:00
|
|
|
, IncludeDir
|
2013-09-19 06:58:50 +00:00
|
|
|
, CompilerOptions(..)
|
2013-09-16 00:56:08 +00:00
|
|
|
-- * Cabal API
|
|
|
|
, parseCabalFile
|
2013-09-20 01:30:51 +00:00
|
|
|
, getCompilerOptions
|
2013-09-16 00:56:08 +00:00
|
|
|
, cabalAllBuildInfo
|
|
|
|
, cabalDependPackages
|
|
|
|
, cabalSourceDirs
|
2013-09-20 08:25:28 +00:00
|
|
|
, cabalAllTargets
|
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-03-26 03:09:02 +00:00
|
|
|
-- * IO
|
2013-09-16 00:56:08 +00:00
|
|
|
, getDynamicFlags
|
2014-04-28 04:52:28 +00:00
|
|
|
-- * Targets
|
2013-08-21 08:21:49 +00:00
|
|
|
, setTargetFiles
|
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(..)
|
|
|
|
, newGhcModEnv
|
|
|
|
, GhcModState
|
|
|
|
, defaultState
|
2014-07-22 17:45:48 +00:00
|
|
|
, CompilerMode(..)
|
|
|
|
, GhcModLog
|
2014-07-18 06:42:05 +00:00
|
|
|
-- * Monad utilities
|
|
|
|
, runGhcModT'
|
2014-08-28 09:54:01 +00:00
|
|
|
, hoistGhcModT
|
2014-07-18 06:42:05 +00:00
|
|
|
-- ** Accessing 'GhcModEnv' and 'GhcModState'
|
|
|
|
, options
|
|
|
|
, cradle
|
2014-07-22 17:45:48 +00:00
|
|
|
, getCompilerMode
|
|
|
|
, setCompilerMode
|
2014-07-18 06:42:05 +00:00
|
|
|
, withOptions
|
2014-09-18 08:05:47 +00:00
|
|
|
-- * 'GhcModError'
|
|
|
|
, gmeDoc
|
2014-08-14 01:08:48 +00:00
|
|
|
-- * 'GhcMonad' Choice
|
2013-09-16 00:56:08 +00:00
|
|
|
, (||>)
|
|
|
|
, goNext
|
|
|
|
, runAnyOne
|
2014-09-23 08:34:09 +00:00
|
|
|
-- * World
|
|
|
|
, World
|
2014-09-23 12:28:03 +00:00
|
|
|
, getCurrentWorld
|
|
|
|
, isWorldChanged
|
2013-08-26 16:28:21 +00:00
|
|
|
) where
|
|
|
|
|
2014-07-12 01:30:06 +00:00
|
|
|
import GHC.Paths (libdir)
|
|
|
|
|
2013-09-16 00:56:08 +00:00
|
|
|
import Language.Haskell.GhcMod.CabalApi
|
2014-09-23 12:28:03 +00:00
|
|
|
import Language.Haskell.GhcMod.CabalConfig
|
2014-07-12 01:30:06 +00:00
|
|
|
import Language.Haskell.GhcMod.DynFlags
|
2014-09-18 08:05:47 +00:00
|
|
|
import Language.Haskell.GhcMod.Error
|
2013-09-16 00:56:08 +00:00
|
|
|
import Language.Haskell.GhcMod.GHCChoice
|
2014-04-28 12:47:08 +00:00
|
|
|
import Language.Haskell.GhcMod.Logger
|
2014-07-18 06:42:05 +00:00
|
|
|
import Language.Haskell.GhcMod.Monad
|
2014-07-18 05:05:20 +00:00
|
|
|
import Language.Haskell.GhcMod.Target
|
2013-08-26 16:28:21 +00:00
|
|
|
import Language.Haskell.GhcMod.Types
|
2014-09-18 08:05:47 +00:00
|
|
|
import Language.Haskell.GhcMod.Utils
|
2014-07-12 01:30:06 +00:00
|
|
|
|
|
|
|
-- | Obtaining the directory for ghc system libraries.
|
|
|
|
ghcLibDir :: FilePath
|
|
|
|
ghcLibDir = libdir
|