darcs

Issue 2021 Printables seem to consist of only single characters

Title Printables seem to consist of only single characters
Priority Status resolved
Milestone Resolved in 2.8.0
Superseder Nosy List g9ks157k
Assigned To
Topics

Created on 2010-12-17.19:46:43 by g9ks157k, last changed 2011-10-27.21:35:54 by markstos.

Messages
msg13375 (view) Author: g9ks157k Date: 2010-12-17.19:46:41
Hello,

while debugging encoding problems in darcs, I replaced the definition of
Printer.hPrintPrintable with the following code (which outputs pure
ASCII and explicitely shows non-ASCII character codes and such):

    hPrintPrintable h (S str)            = hPutStr h ("String:\n" ++ show str ++ "\n")
    hPrintPrintable h (PS byteStr)       = hPutStr h ("ByteString:\n" ++ show (B.unpack byteStr) ++ "\n")
    hPrintPrintable h (Both str byteStr) = hPrintPrintable h (S str) >> hPrintPrintable h (PS byteStr)

I then ran darcs changes on a small repository. This revealed an
interesting phenomenon: Every “Printable” that hPrintPrintable was
called with seemed to consist of only a single character (sometimes
represented by S, sometimes by Both). So hPrintPrintable is obviously
called once per character, which doesn’t seem sensible.

Best wishes,
Wolfgang
msg14796 (view) Author: markstos Date: 2011-10-27.21:35:53
This issue is supposedly resolved by this patch:

"Resolve issue 2021: make escaping not split strings too much"
History
Date User Action Args
2010-12-17 19:46:43g9ks157kcreate
2011-10-27 21:35:54markstossetstatus: unknown -> resolved
messages: + msg14796
resolvedin: 2.8.0