aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/GhcUtils.hs
diff options
context:
space:
mode:
authorMateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>2015-01-22 23:34:05 +0000
committerMateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>2015-01-22 23:34:05 +0000
commit8e06728afb0784128ab2df0be7a5d7a191d30ff4 (patch)
tree38e862855249d31dd2789b2a9a6c17ee61e9a656 /haddock-api/src/Haddock/GhcUtils.hs
parentfe10d3082457f744fd27bbb1085edcfd813f6290 (diff)
--package-name and --package-version flags
Used for --hoogle amongst other things. Now we need to teach cabal to use it. The situation is still a bit sub-par because if the flags aren't passed in, the crash will occur. Closes #353.
Diffstat (limited to 'haddock-api/src/Haddock/GhcUtils.hs')
-rw-r--r--haddock-api/src/Haddock/GhcUtils.hs14
1 files changed, 0 insertions, 14 deletions
diff --git a/haddock-api/src/Haddock/GhcUtils.hs b/haddock-api/src/Haddock/GhcUtils.hs
index 5aa9b818..416f5d71 100644
--- a/haddock-api/src/Haddock/GhcUtils.hs
+++ b/haddock-api/src/Haddock/GhcUtils.hs
@@ -16,18 +16,14 @@
module Haddock.GhcUtils where
-import Data.Version
import Control.Applicative ( (<$>) )
import Control.Arrow
-import Data.Foldable hiding (concatMap)
import Data.Function
-import Data.Traversable
import Exception
import Outputable
import Name
import Lexeme
-import Packages
import Module
import RdrName (GlobalRdrEnv)
import GhcMonad (withSession)
@@ -40,15 +36,6 @@ import Class
moduleString :: Module -> String
moduleString = moduleNameString . moduleName
-
--- return the (name,version) of the package
-modulePackageInfo :: DynFlags -> Module -> (PackageName, Version)
-modulePackageInfo dflags modu =
- (packageName pkg, packageVersion pkg)
- where
- pkg = getPackageDetails dflags (modulePackageKey modu)
-
-
lookupLoadedHomeModuleGRE :: GhcMonad m => ModuleName -> m (Maybe GlobalRdrEnv)
lookupLoadedHomeModuleGRE mod_name = withSession $ \hsc_env ->
case lookupUFM (hsc_HPT hsc_env) mod_name of
@@ -288,4 +275,3 @@ setStubDir f d = d{ stubDir = Just f, includePaths = f : includePaths d }
-- -stubdir D adds an implicit -I D, so that gcc can find the _stub.h file
-- \#included from the .hc file when compiling with -fvia-C.
setOutputDir f = setObjectDir f . setHiDir f . setStubDir f
-