diff options
author | Simon Hengel <sol@typeful.net> | 2012-10-09 15:31:06 +0200 |
---|---|---|
committer | Simon Hengel <sol@typeful.net> | 2012-10-09 15:31:06 +0200 |
commit | 409b25a0e9821687eeffde3d6bdb87f0fd9c73f9 (patch) | |
tree | 4bcf064c96c302a55b556821c469345cfe6a4b60 /src | |
parent | 9d46da45a53678469d5fe4ef33f37bba45294633 (diff) |
Allow to load interface files with compatible versions
Diffstat (limited to 'src')
-rw-r--r-- | src/Haddock/InterfaceFile.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Haddock/InterfaceFile.hs b/src/Haddock/InterfaceFile.hs index 78ab892b..1f6b489d 100644 --- a/src/Haddock/InterfaceFile.hs +++ b/src/Haddock/InterfaceFile.hs @@ -79,6 +79,9 @@ binaryInterfaceVersion = 22 #error Unknown GHC version #endif +binaryInterfaceVersionCompatibility :: [Word16] +binaryInterfaceVersionCompatibility = [21, 22] + initBinMemSize :: Int initBinMemSize = 1024*1024 @@ -187,7 +190,7 @@ readInterfaceFile (get_name_cache, set_name_cache) filename = do case () of _ | magic /= binaryInterfaceMagic -> return . Left $ "Magic number mismatch: couldn't load interface file: " ++ filename - | version /= binaryInterfaceVersion -> return . Left $ + | version `notElem` binaryInterfaceVersionCompatibility -> return . Left $ "Interface file is of wrong version: " ++ filename | otherwise -> with_name_cache $ \update_nc -> do |