diff options
author | David Waern <david.waern@gmail.com> | 2011-11-05 22:00:57 +0100 |
---|---|---|
committer | David Waern <david.waern@gmail.com> | 2011-11-05 23:30:02 +0100 |
commit | 0a8d2696f88e0308fd689475ce2896b6ba014694 (patch) | |
tree | 4a3a54a5e242b6687ab4008e4fbc07a636e7c06e | |
parent | 86cf889e7d746f68d65900f3b5f0d31b24aef7bf (diff) |
Fix build.
-rw-r--r-- | src/Main.hs | 13 |
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 () |