From: Simon Marlow Date: Thu, 25 Nov 2010 10:25:20 +0000 (+0000) Subject: Encode immediately in hPutStr and hPutChar X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=5522b142e24b9dbba21a9036746db20e78cf8f43;hp=5522b142e24b9dbba21a9036746db20e78cf8f43;p=ghc-base.git 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. ---