[cvs-nhc98] cvs commit: hat/src/hattools HatSource.hs
olaf at haskell.org
olaf at haskell.org
Thu Sep 2 13:51:33 EDT 2004
olaf 2004/09/02 10:51:32 PDT
Modified files:
src/hattools HatSource.hs
Log:
Corrected mergePos in module extra to correct the attached bug.
Also made some more progress with hat-source.
------------------------ Bug report:
I just checked out the latest Hat sources from the CVS. After
successful compilation and installation, I think I have a bug
at hand, in the treatment of left section expressions, e.g. (2+).
A very simple program that generates the bug (let's call the
file hattest.hs):
generator = ("Hello " ++) . ("world!" ++)
main = putStrLn (generator "")
Here's what I get:
formal:~/foo> hmake -hat hattest
hat-trans hattest.hs
Fail: mergePos 1:23-1:24 1:14-1:21
As I understand it, (1:23-1:24) is the first "++" and 1:14-1:21
is the string "Hello ". The left section is (correctly) converted
to the application:
(++) "Hello "
but then possitions of the two subexpressions come the wrong way
and mergePos complains.
I know it can be fixed by writing the expression above instead of
the left section, but (as this occurs in all Show instances several
times) I think it is not an acceptable solution.
Am I missing something? If not, could somebody fix it?
Thank you in advance,
Nikos.
Revision Changes Path
1.3 +116 -20 hat/src/hattools/HatSource.hs
More information about the Cvs-nhc98
mailing list