aboutsummaryrefslogtreecommitdiff
path: root/src/Main.hs
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2008-08-28 14:22:29 +0000
committerIan Lynagh <igloo@earth.li>2008-08-28 14:22:29 +0000
commit54825d3531346ee52a48163f2e2b14d62b90d13b (patch)
treedf5ad7cbd4c9803c14463cb2b119ee6371b68e55 /src/Main.hs
parent56f2789e70905b790fc961455bcb9fbe56cc6626 (diff)
Fixes for using haddock in a GHC build tree
Diffstat (limited to 'src/Main.hs')
-rw-r--r--src/Main.hs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Main.hs b/src/Main.hs
index f9820243..310214c6 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -38,7 +38,9 @@ import System.Exit
import System.Environment
import GHC
+#ifdef GHC_PATHS
import GHC.Paths
+#endif
import DynFlags
import Bag
import ErrUtils
@@ -137,7 +139,12 @@ main = handleTopExceptions $ do
let libDir
| Just dir <- getGhcLibDir flags = dir
- | otherwise = libdir -- from GHC.Paths
+ | otherwise =
+#ifdef GHC_PATHS
+ libdir -- from GHC.Paths
+#else
+ error "No GhcLibDir"
+#endif
-- initialize GHC
(session, dynflags) <- startGhc libDir (ghcFlags flags)