haddock-hardcode-ghc-paths
authorDebian Haskell Group <pkg-haskell-maintainers@lists.alioth.debian.org>
Sat, 16 Jun 2012 10:48:18 +0000 (10:48 +0000)
committerJoachim Breitner <nomeata@debian.org>
Sat, 16 Jun 2012 10:48:18 +0000 (10:48 +0000)
===================================================================

Gbp-Pq: Name haddock-hardcode-ghc-paths

utils/haddock/haddock.cabal
utils/haddock/src/Main.hs

index 84d3c2a8c2fd4881113d7218240f0ad7c11522ff..8c3520e3adaa02f63222d60c31e595f4da5650b2 100644 (file)
@@ -78,10 +78,6 @@ flag test
 
 executable haddock
   default-language:     Haskell2010
-  -- In a GHC tree - in particular, in a source tarball - we don't
-  -- require alex or happy
-  if !flag(in-ghc-tree)
-    build-tools: alex >= 2.3, happy >= 1.18
   build-depends:
     base >= 4.3 && < 4.6,
     filepath,
@@ -95,8 +91,6 @@ executable haddock
 
   if flag(in-ghc-tree)
     cpp-options: -DIN_GHC_TREE
-  else
-    build-depends: ghc-paths
 
   if flag(test)
     cpp-options: -DTEST
@@ -157,8 +151,6 @@ library
 
   if flag(in-ghc-tree)
     cpp-options: -DIN_GHC_TREE
-  else
-    build-depends: ghc-paths
 
   if flag(test)
     cpp-options: -DTEST
index 0a3c9ffcd0aded8a0b8f34710627fda8c24bf2c5..575afd0dfb29c8252fc8094d1aff2296822763db 100644 (file)
@@ -50,7 +50,6 @@ import Data.Int
 #ifdef IN_GHC_TREE
 import System.FilePath
 #else
-import qualified GHC.Paths as GhcPaths
 import Paths_haddock
 #endif
 
@@ -344,14 +343,14 @@ getGhcDirs flags = do
       libDir <- getInTreeDir
       return (ghcPath, libDir)
 #else
-      return (ghcPath, GhcPaths.libdir)
+      return (ghcPath, "/usr/lib/ghc")
 #endif
     xs -> return (ghcPath, last xs)
   where
 #ifdef IN_GHC_TREE
     ghcPath = "not available"
 #else
-    ghcPath = GhcPaths.ghc
+    ghcPath = "/usr"
 #endif