X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Futils%2FBinary.hs;h=11f3b12317d9a651e2216ae57ad57550b312a069;hb=9d0c8f842e35dde3d570580cf62a32779f66a6de;hp=cbfec74cff1077464a1e3448c5f5f8a5d3d1951b;hpb=ab1d5052de53479377c961d1e966f0cf0b82c592;p=ghc-hetmet.git diff --git a/compiler/utils/Binary.hs b/compiler/utils/Binary.hs index cbfec74..11f3b12 100644 --- a/compiler/utils/Binary.hs +++ b/compiler/utils/Binary.hs @@ -146,11 +146,11 @@ class Binary a where -- define one of put_, put. Use of put_ is recommended because it -- is more likely that tail-calls can kick in, and we rarely need the -- position return value. - put_ bh a = do put bh a; return () + put_ bh a = do _ <- put bh a; return () put bh a = do p <- tellBin bh; put_ bh a; return p putAt :: Binary a => BinHandle -> Bin a -> a -> IO () -putAt bh p x = do seekBin bh p; put bh x; return () +putAt bh p x = do seekBin bh p; put_ bh x; return () getAt :: Binary a => BinHandle -> Bin a -> IO a getAt bh p = do seekBin bh p; get bh