aboutsummaryrefslogtreecommitdiff
path: root/src/Main.hs
diff options
context:
space:
mode:
authordavve <davve@dtek.chalmers.se>2006-10-05 16:40:11 +0000
committerdavve <davve@dtek.chalmers.se>2006-10-05 16:40:11 +0000
commit32d9e028315fb384e95e5f96fb019193cec9a222 (patch)
tree529eb0e4e4031c99a09c3e052acdee18bdf03e7f /src/Main.hs
parent1e9f7a39e38e8133844196be35ff8d4a243ffc60 (diff)
Merge with changes to ghc HEAD
Diffstat (limited to 'src/Main.hs')
-rw-r--r--src/Main.hs13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/Main.hs b/src/Main.hs
index acf9893a..1b3cc0fa 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -35,8 +35,7 @@ import Data.Map (Map)
import Distribution.InstalledPackageInfo ( InstalledPackageInfo(..) )
-import qualified GHC ( init )
-import GHC hiding ( init )
+import GHC
import Outputable
import SrcLoc
import Digraph ( flattenSCC )
@@ -55,7 +54,6 @@ import FastString
import DynFlags hiding ( Option )
import Packages hiding ( package )
import StaticFlags ( parseStaticFlags )
-import Unique ( mkUnique )
-----------------------------------------------------------------------------
-- Top-level stuff
@@ -183,11 +181,10 @@ extractGHCFlags flags = [ flag | Flag_GHCFlag flag <- flags ]
startGHC :: String -> IO (Session, DynFlags)
startGHC libDir = do
- GHC.init (Just libDir)
let ghcMode = BatchCompile
- session <- newSession ghcMode
+ session <- newSession ghcMode (Just libDir)
flags <- getSessionDynFlags session
- flags' <- initPackages flags
+ flags' <- liftM fst (initPackages flags)
let flags'' = dopt_set flags' Opt_Haddock
return (session, flags'')
@@ -1213,8 +1210,8 @@ packageDocEnv mods infos = concatMap moduleDocEnv (zip mods infos)
getPackages :: Session -> DynFlags -> IO [PackageData]
getPackages session dynflags = do
- -- get InstalledPackageInfo's for every package in the session
- pkgInfos <- getExplicitPackagesAnd dynflags []
+ -- get InstalledPackageInfos for every package in the session
+ pkgInfos <- getPreloadPackagesAnd dynflags []
-- return a list of those packages that we could create PackageData's for
let pkgInfos' = filter notRTS pkgInfos