patch applied (ghc-7.0/packages/base): Encode immediately in hPutStr and hPutChar

Ian Lynagh igloo at earth.li
Thu Nov 25 12:41:26 EST 2010


Thu Nov 25 02:25:20 PST 2010  Simon Marlow <marlowsd at gmail.com>
  * Encode immediately in hPutStr and hPutChar
  This means that decoding errors will be detected accurately, and can
  be caught and handled.  Overall the implementation is simpler this way
  too.
  
  It does impose a performance hit on small hPutStrs, although larger
  hPutStrs seem to be unaffected.  To compensate somewhat, I optimised
  hPutStrLn.

    M ./GHC/IO/Handle.hs -24 +4
    M ./GHC/IO/Handle/Internals.hs -52 +60
    M ./GHC/IO/Handle/Text.hs -128 +78
    M ./GHC/IO/Handle/Types.hs -17 +47
    M ./System/IO.hs -10 +2

View patch online:
http://darcs.haskell.org/cgi-bin/darcsweb.cgi?r=ghc-7.0/packages/base;a=darcs_commitdiff;h=20101125102520-12142-b65ba66fbfe45bcc6c6cff6278271c2d1989c491.gz


More information about the Cvs-libraries mailing list