From 0a8d2696f88e0308fd689475ce2896b6ba014694 Mon Sep 17 00:00:00 2001 From: David Waern Date: Sat, 5 Nov 2011 22:00:57 +0100 Subject: Fix build. --- src/Main.hs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src') 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 () -- cgit v1.2.3