--
-- Binary interface file support.
-module BinIface ( writeBinIface, readBinIface ) where
+module BinIface ( writeBinIface, readBinIface, v_IgnoreHiVersion ) where
#include "HsVersions.h"
import Panic
import SrcLoc
import Binary
+import Util
-import DATA_IOREF ( readIORef )
+import DATA_IOREF
import EXCEPTION ( throwDyn )
import Monad ( when )
lazyPut bh deprecs
get bh = do
check_ver <- get bh
+ ignore_ver <- readIORef v_IgnoreHiVersion
build_tag <- readIORef v_Build_tag
let our_ver = show opt_HiVersion ++ build_tag
- when (check_ver /= our_ver) $
+ when (check_ver /= our_ver && not ignore_ver) $
-- use userError because this will be caught by readIface
-- which will emit an error msg containing the iface module name.
throwDyn (ProgramError (
pi_rules = rules,
pi_deprecs = deprecs })
+GLOBAL_VAR(v_IgnoreHiVersion, False, Bool)
+
-- ----------------------------------------------------------------------------
{-* Generated by DrIFT-v1.0 : Look, but Don't Touch. *-}
putByte bh 2
put_ bh UfInlineMe = do
putByte bh 3
+ put_ bh (UfCoreNote s) = do
+ putByte bh 4
+ put_ bh s
get bh = do
h <- getByte bh
case h of
1 -> do ab <- get bh
return (UfCoerce ab)
2 -> do return UfInlineCall
- _ -> do return UfInlineMe
+ 3 -> do return UfInlineMe
+ _ -> do ac <- get bh
+ return (UfCoreNote ac)
instance (Binary name) => Binary (BangType name) where
put_ bh (BangType aa ab) = do