aboutsummaryrefslogtreecommitdiff
path: root/src/Main.hs
diff options
context:
space:
mode:
authorDavid Waern <david.waern@gmail.com>2011-11-05 22:00:57 +0100
committerDavid Waern <david.waern@gmail.com>2011-11-05 23:30:02 +0100
commit0a8d2696f88e0308fd689475ce2896b6ba014694 (patch)
tree4a3a54a5e242b6687ab4008e4fbc07a636e7c06e /src/Main.hs
parent86cf889e7d746f68d65900f3b5f0d31b24aef7bf (diff)
Fix build.
Diffstat (limited to 'src/Main.hs')
-rw-r--r--src/Main.hs13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/Main.hs b/src/Main.hs
index 145c26e6..c8b17a0c 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -335,15 +335,16 @@ getHaddockLibDir flags =
getGhcDirs :: [Flag] -> IO (String, String)
-getGhcDirs flags =
- case [ dir | Flag_GhcLibDir dir <- flags ] of
- [] ->
+getGhcDirs flags = do
+ (ghcPath, libDir) <-
#ifdef IN_GHC_TREE
- getInTreeDirs
+ getInTreeDirs
#else
- return (GhcPaths.ghc, GhcPaths.libdir) -- from GHC.Paths
+ return (GhcPaths.ghc, GhcPaths.libdir)
#endif
- xs -> return (GhcPaths.ghc, last xs)
+ case [ dir | Flag_GhcLibDir dir <- flags ] of
+ [] -> return (ghcPath, libDir)
+ xs -> return (ghcPath, last xs)
shortcutFlags :: [Flag] -> IO ()