[darcs-devel] [issue2021] Printables seem to consist of only single characters

Wolfgang Jeltsch bugs at darcs.net
Fri Dec 17 19:46:43 UTC 2010


New submission from Wolfgang Jeltsch <g9ks157k at acme.softbase.org>:

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

----------
messages: 13375
nosy: g9ks157k
status: unknown
title: Printables seem to consist of only single characters

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/issue2021>
__________________________________


More information about the darcs-devel mailing list