Skip to content
  • Simon Marlow's avatar
    Encode immediately in hPutStr and hPutChar · 62c11c91
    Simon Marlow authored
    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.
    62c11c91