[Git][ghc/ghc][wip/compact-iface] 8.6.5 hack, for now

Matthew Pickering gitlab at gitlab.haskell.org
Wed Mar 25 09:26:35 UTC 2020



Matthew Pickering pushed to branch wip/compact-iface at Glasgow Haskell Compiler / GHC


Commits:
0e1ef282 by Matthew Pickering at 2020-03-25T09:26:01+00:00
8.6.5 hack, for now

This instance is only used in rare code paths such as HieFiles

- - - - -


1 changed file:

- compiler/utils/Binary.hs


Changes:

=====================================
compiler/utils/Binary.hs
=====================================
@@ -1122,10 +1122,12 @@ putBS bh bs =
     putPrim bh l (\op -> BS.memcpy op (castPtr ptr) l)
 
 putSBS :: BinHandle -> ShortByteString -> IO ()
-putSBS bh bs =
+putSBS bh bs = putBS bh (BSS.fromShort bs)
+{-
   BSS.useAsCStringLen bs $ \(ptr, l) -> do
     put_ bh l
     putPrim bh l (\op -> BS.memcpy op (castPtr ptr) l)
+    -}
 
 getSBS :: BinHandle -> IO ShortByteString
 getSBS bh = do



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0e1ef2821f793b370972d0378a67c3b84a485e5d

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0e1ef2821f793b370972d0378a67c3b84a485e5d
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20200325/4479d77d/attachment.html>


More information about the ghc-commits mailing list