[commit: haddock] master: Fixes #231 (5131510)
git at git.haskell.org
git at git.haskell.org
Wed Sep 18 23:25:34 CEST 2013
Repository : ssh://git@git.haskell.org/haddock
On branch : master
Link : http://git.haskell.org/haddock.git/commitdiff/51315107171402cf2bef93d5ff06c87d070a078b
>---------------------------------------------------------------
commit 51315107171402cf2bef93d5ff06c87d070a078b
Author: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk>
Date: Thu Sep 5 03:21:44 2013 +0100
Fixes #231
>---------------------------------------------------------------
51315107171402cf2bef93d5ff06c87d070a078b
src/Haddock.hs | 3 ++-
src/Haddock/InterfaceFile.hs | 2 +-
src/Haddock/Options.hs | 4 +++-
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/Haddock.hs b/src/Haddock.hs
index 3b31c75..5f5b115 100644
--- a/src/Haddock.hs
+++ b/src/Haddock.hs
@@ -367,6 +367,8 @@ shortcutFlags flags = do
when (Flag_Help `elem` flags) (bye usage)
when (Flag_Version `elem` flags) byeVersion
when (Flag_InterfaceVersion `elem` flags) (bye (show binaryInterfaceVersion ++ "\n"))
+ when (Flag_CompatibleInterfaceVersions `elem` flags)
+ (bye (unwords (map show binaryInterfaceVersionCompatibility) ++ "\n"))
when (Flag_GhcVersion `elem` flags) (bye (cProjectVersion ++ "\n"))
when (Flag_PrintGhcPath `elem` flags) $ do
@@ -448,4 +450,3 @@ getExecDir = return Nothing
#endif
#endif
-
diff --git a/src/Haddock/InterfaceFile.hs b/src/Haddock/InterfaceFile.hs
index 1127205..4811f64 100644
--- a/src/Haddock/InterfaceFile.hs
+++ b/src/Haddock/InterfaceFile.hs
@@ -15,7 +15,7 @@
module Haddock.InterfaceFile (
InterfaceFile(..), ifPackageId,
readInterfaceFile, nameCacheFromGhc, freshNameCache, NameCacheAccessor,
- writeInterfaceFile, binaryInterfaceVersion
+ writeInterfaceFile, binaryInterfaceVersion, binaryInterfaceVersionCompatibility
) where
diff --git a/src/Haddock/Options.hs b/src/Haddock/Options.hs
index 46f9def..a362fd0 100644
--- a/src/Haddock/Options.hs
+++ b/src/Haddock/Options.hs
@@ -62,6 +62,7 @@ data Flag
| Flag_Help
| Flag_Verbosity String
| Flag_Version
+ | Flag_CompatibleInterfaceVersions
| Flag_InterfaceVersion
| Flag_UseContents String
| Flag_GenContents
@@ -131,6 +132,8 @@ options backwardsCompat =
"display this help and exit",
Option ['V'] ["version"] (NoArg Flag_Version)
"output version information and exit",
+ Option [] ["compatible-interface-versions"] (NoArg Flag_CompatibleInterfaceVersions)
+ "output compatible interface file versions and exit",
Option [] ["interface-version"] (NoArg Flag_InterfaceVersion)
"output interface file version and exit",
Option ['v'] ["verbosity"] (ReqArg Flag_Verbosity "VERBOSITY")
@@ -272,4 +275,3 @@ readIfaceArgs flags = [ parseIfaceOption s | Flag_ReadInterface s <- flags ]
optLast :: [a] -> Maybe a
optLast [] = Nothing
optLast xs = Just (last xs)
-
More information about the ghc-commits
mailing list