projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replacing copyins and copyouts with data-movement instructions
[ghc-hetmet.git]
/
compiler
/
iface
/
BinIface.hs
diff --git
a/compiler/iface/BinIface.hs
b/compiler/iface/BinIface.hs
index
152381c
..
ab4ab01
100644
(file)
--- a/
compiler/iface/BinIface.hs
+++ b/
compiler/iface/BinIface.hs
@@
-73,6
+73,12
@@
readBinIface_ checkHiWay traceBinIFaceReading hi_path nc = do
= printer (text what <> text ": " <>
vcat [text "Wanted " <> ppr wanted <> text ",",
text "got " <> ppr got])
= printer (text what <> text ": " <>
vcat [text "Wanted " <> ppr wanted <> text ",",
text "got " <> ppr got])
+
+ errorOnMismatch' :: (Eq a, Show a) => String -> a -> a -> IO () -> IO ()
+ errorOnMismatch' what wanted got io
+ = do when (wanted /= got) $ io
+ errorOnMismatch what wanted got
+
errorOnMismatch :: (Eq a, Show a) => String -> a -> a -> IO ()
errorOnMismatch what wanted got
-- This will be caught by readIface which will emit an error
errorOnMismatch :: (Eq a, Show a) => String -> a -> a -> IO ()
errorOnMismatch what wanted got
-- This will be caught by readIface which will emit an error