Text.PrettyPrint.HughesPJ bug (return of the dead?)

Johannes Waldmann joe@informatik.uni-leipzig.de
Sun, 20 Jul 2003 15:05:46 +0200 (CEST)


There once was a bug in Text.PrettyPrint.HughesPJ
causing it to print infinitely many spaces.
http://haskell.org/pipermail/glasgow-haskell-users/2001-November/002584.html

It seems this code has re-appeared in the ghc-6.0 libraries:

> spaces 0 = ""
> spaces n       = ' ' : spaces (n - 1)

this should be  replicate n ' '  or something 
that behaves nicely for negative arguments.
(that shouldn't of course be there in the first place
but this seems harder to fix. somehow related to nesting, etc.)

Best regards,
-- 
-- Johannes Waldmann ---- http://www.informatik.uni-leipzig.de/~joe/ --
-- joe@informatik.uni-leipzig.de -- phone/fax (+49) 341 9732 204/209 --