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

Thanks. I'm not sure I ever actually fixed it, because I wanted to fix the "real" bug. But I havn't gotten around to doing so, so I'm now compromising by making 'spaces' behave sensibly on a negative argument. Nevertheless, 'spaces' should never be called with a negative argument, so this "fix" is a hack. If anyone wants to find the Real Bug, I'd be happy. Meanwhile, at least it no longer loops. Simon | -----Original Message----- | From: glasgow-haskell-users-admin@haskell.org [mailto:glasgow-haskell-users-admin@haskell.org] | On Behalf Of Johannes Waldmann | Sent: 20 July 2003 14:06 | To: glasgow-haskell-users@haskell.org | Subject: Text.PrettyPrint.HughesPJ bug (return of the dead?) | | 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 -- | | _______________________________________________ | Glasgow-haskell-users mailing list | Glasgow-haskell-users@haskell.org | http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
participants (1)
-
Simon Peyton-Jones