[Pkg-haskell-commits] darcs: ghc: Patch haddock to have --interface-version flag

Joachim Breitner mail at joachim-breitner.de
Wed Mar 23 07:55:00 UTC 2011


Wed Mar 23 04:59:04 UTC 2011  Joachim Breitner <mail at joachim-breitner.de>
  * Patch haddock to have --interface-version flag
  Ignore-this: 4c3b245d3c8e71e7b6bb527836c4125f

    A ./patches/haddock-expose-interface-version
    M ./patches/series +1

Wed Mar 23 04:59:04 UTC 2011  Joachim Breitner <mail at joachim-breitner.de>
  * Patch haddock to have --interface-version flag
  Ignore-this: 4c3b245d3c8e71e7b6bb527836c4125f
diff -rN -u old-ghc/patches/haddock-expose-interface-version new-ghc/patches/haddock-expose-interface-version
--- old-ghc/patches/haddock-expose-interface-version	1970-01-01 00:00:00.000000000 +0000
+++ new-ghc/patches/haddock-expose-interface-version	2011-03-23 07:55:00.732396427 +0000
@@ -0,0 +1,56 @@
+Index: ghc-7.0.2/utils/haddock/src/Haddock/InterfaceFile.hs
+===================================================================
+--- ghc-7.0.2.orig/utils/haddock/src/Haddock/InterfaceFile.hs	2011-03-23 10:23:21.000000000 +0530
++++ ghc-7.0.2/utils/haddock/src/Haddock/InterfaceFile.hs	2011-03-23 10:23:38.000000000 +0530
+@@ -14,7 +14,7 @@
+ module Haddock.InterfaceFile (
+   InterfaceFile(..), ifPackageId,
+   readInterfaceFile, nameCacheFromGhc, freshNameCache, NameCacheAccessor,
+-  writeInterfaceFile
++  writeInterfaceFile, binaryInterfaceVersion
+ ) where
+ 
+ 
+Index: ghc-7.0.2/utils/haddock/src/Haddock/Options.hs
+===================================================================
+--- ghc-7.0.2.orig/utils/haddock/src/Haddock/Options.hs	2011-03-23 10:24:48.000000000 +0530
++++ ghc-7.0.2/utils/haddock/src/Haddock/Options.hs	2011-03-23 10:25:46.000000000 +0530
+@@ -77,6 +77,7 @@
+   | Flag_NoTmpCompDir
+   | Flag_Qualification String
+   | Flag_PrettyHtml
++  | Flag_InterfaceVersion
+   deriving (Eq)
+ 
+ 
+@@ -147,6 +148,8 @@
+       "option to be forwarded to GHC",
+     Option []  ["ghc-version"]  (NoArg Flag_GhcVersion)
+       "output GHC version in numeric format",
++    Option []  ["interface-version"]  (NoArg Flag_InterfaceVersion)
++      "output haddock interface file version number",
+     Option []  ["print-ghc-libdir"]  (NoArg Flag_PrintGhcLibDir)
+       "output GHC lib dir",
+     Option ['w'] ["no-warnings"] (NoArg Flag_NoWarnings) "turn off all warnings",
+Index: ghc-7.0.2/utils/haddock/src/Main.hs
+===================================================================
+--- ghc-7.0.2.orig/utils/haddock/src/Main.hs	2011-03-23 10:23:54.000000000 +0530
++++ ghc-7.0.2/utils/haddock/src/Main.hs	2011-03-23 10:26:59.000000000 +0530
+@@ -352,6 +352,7 @@
+   when (Flag_Help           `elem` flags) (bye usage)
+   when (Flag_Version        `elem` flags) byeVersion
+   when (Flag_GhcVersion     `elem` flags) byeGhcVersion
++  when (Flag_InterfaceVersion `elem` flags) byeInterfaceVersion
+ 
+   when (Flag_PrintGhcLibDir `elem` flags) $ do
+     dir <- getGhcLibDir flags
+@@ -378,6 +379,9 @@
+ 
+     byeGhcVersion = bye (cProjectVersion ++ "\n")
+ 
++    byeInterfaceVersion = bye $
++      "haddock-interface-" ++ show binaryInterfaceVersion ++ "\n"
++
+ 
+ updateHTMLXRefs :: [(DocPaths, InterfaceFile)] -> IO ()
+ updateHTMLXRefs packages = writeIORef html_xrefs_ref (Map.fromList mapping)
diff -rN -u old-ghc/patches/series new-ghc/patches/series
--- old-ghc/patches/series	2011-03-23 07:55:00.716395584 +0000
+++ new-ghc/patches/series	2011-03-23 07:55:00.748397270 +0000
@@ -9,3 +9,4 @@
 debian-changes-7.0.2-3
 lpthread-bootstrap-workaround
 autoconf
+haddock-expose-interface-version





More information about the Pkg-haskell-commits mailing list