toUpper Bug?
Steinitz, Dominic J
Dominic.J.Steinitz@BritishAirways.com
16 Aug 2001 07:57:00 Z
Alastair,
It's good to know someone is doing something with reported bugs. toUpper being in the wrong library is a minor annoyance so it doesn't sound like the effort of fixing it is worth it. The other bug about not behaving properly for i with a circumflex is more serious and I hope will be fixed.
I'd like to suggest that someone acknowledges receipt of bugs even if it's just to say no-one has time to fix it at the moment but it's been put in a list of things to fix and won't get forgotten about.
Dominic.
reid@cs.utah.edu on 15/08/2001 23:25:00
To: Dominic Steinitz
cc: hugs-bugs
bcc:
Subject: Re: toUpper Bug?
[reply just sent to hugs-bugs]
> Maybe if this one is going to be fixed, toUpper could be put in the
> correct library as well?
I'm assuming this is a reference to the fact that toUpper is exported
both from Char (correct) and from Prelude (incorrect)?
A quick check of Prelude.hs and hugs98/src/*.c reveals no good reason
why this code is in the Prelude. Perhaps some vague code tidiness
argument about keeping related code together?
So, it could be fixed quite easily but there's a bunch of similar
deviations from the standard which are not easily fixed because the
Prelude (or some part of the Hugs compiler) depends on the function
which, with the current Hugs implementation, implies that there has to
be a copy in the Prelude.
We don't want to make 2 copies of the same code though (one in the
Prelude but not exported, one in the correct place and exported)
because it leads to code maintenance problems. Suppose that toUpper
had a bug in it - it'd be so easy to fix one copy and forget about the
existence of the second.
Another fix (the preferred fix) is to improve the Hugs compiler so
that the code can have (almost) the same structure as in the report.
We know how to do this (STG-Hugs had it) but it'll take a bit of time
to figure out again exactly which changes are required because the
special treatment of the Prelude is deeply wired into Hugs. (More
precisely, it'll take me a bit of time to find the time to look
through the relevant archives.)
--
Alastair Reid reid@cs.utah.edu http://www.cs.utah.edu/~reid/
_______________________________________________
Hugs-Bugs mailing list
Hugs-Bugs@haskell.org
http://www.haskell.org/mailman/listinfo/hugs-bugs
-------------------------------------------------------------------------------------------------
21st century air travel http://www.britishairways.com