Found bugs in PAKCS show

From: Andy Jost <>
Date: Sun, 25 Jan 2015 19:12:15 +0000

The PAKCS show function seems to have some problems related to the nonprint=
able characters \v and \f, and a different problem related to the single qu=
ote. I'm mentioning these just to be helpful. I am not expecting any urge=
nt action. I am using this version:

Version 1.11.4 (4)
Version of 2014-10-16

[1] Characters \v \f

These characters appear as \v -> \011 and \f -> \012. In fact, 11 and 12 a=
re the correct *decimal* representations of those numbers, but with the lea=
ding '0' they are presented as octal.

>From `man ascii`:

Oct Dec Hex Char
013 11 0B VT '\v' (vertical tab)
014 12 0C FF '\f' (form feed)

I didn't try all special characters, but probably others are affected. Per=
haps this is a formatting error (superfluous leading '0'), or some bug that=
 causes octal encodings to be incorrect.

[2] Single quotes are escaped inside of double-quoted strings. Doing this =
the once is OK, since the single quote is interpreted the same way whether =
it is escaped or not. But if show is applied multiple times, the extra bac=
kslash is further escaped, causing an incorrect result.

Here's a demonstration of the problem:

% pakcs -q
show 'a'
length $ show 'a'
show $ show 'a'
length $ show $ show 'a'

% ghci
GHCi, version 7.4.1: :? for help
Prelude> show 'a'
Prelude> length $ show 'a'
Prelude> show $ show 'a'
Prelude> length $ show $ show 'a'

curry mailing list
Received on Mo Jan 26 2015 - 23:49:00 CET

This archive was generated by hypermail 2.3.0 : So Dez 03 2023 - 07:15:14 CET