X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Futils%2FBinary.hs;h=8fdc21abf1d56917ef1d7781f167ef50f142dd66;hb=421819753b3eb4940a26e578ef0e4c5cd31761fa;hp=6bce8321fa7518b2d66eb395e315f0df516293e8;hpb=317fc69d18eda68fd65f5ba634feafbe4a3923da;p=ghc-hetmet.git diff --git a/compiler/utils/Binary.hs b/compiler/utils/Binary.hs index 6bce832..8fdc21a 100644 --- a/compiler/utils/Binary.hs +++ b/compiler/utils/Binary.hs @@ -10,6 +10,13 @@ -- where you can obtain the original version of the Binary library, namely -- http://www.cs.york.ac.uk/fp/nhc98/ +{-# OPTIONS -w #-} +-- The above warning supression flag is a temporary kludge. +-- While working on this module you are encouraged to remove it and fix +-- any warnings in the module. See +-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings +-- for details + module Binary ( {-type-} Bin, {-class-} Binary(..), @@ -660,16 +667,6 @@ getFS bh = do -- go 0 -#if __GLASGOW_HASKELL__ < 600 -mallocForeignPtrBytes :: Int -> IO (ForeignPtr a) -mallocForeignPtrBytes n = do - r <- mallocBytes n - newForeignPtr r (finalizerFree r) - -foreign import ccall unsafe "stdlib.h free" - finalizerFree :: Ptr a -> IO () -#endif - instance Binary PackageId where put_ bh pid = put_ bh (packageIdFS pid) get bh = do { fs <- get bh; return (fsToPackageId fs) }