Happy, GLR and GHC 6.6

Hi everyone, As we all know, FiniteMap was deprecated, and with GHC-6.6 Data.Map must be used instead. Some function names in Data.Map clash with names in prelude, and Map is usually imported qualified. Happy generates GLR parsers (-l), but the templates it uses keep calling FiniteMap functions. When Data.Map is imported, it's not imported qualified and some function names are ambiguous. I've been using a modified template to generate a GLR parser with GHC-6.6 and it seems to work just fine (there are few changes, not a big deal anyway). I just got the most recent version of Happy and the problem remains, so I applied my changes to GLR_Lib.lhs and ran a diff. The result is attached to this mail. Hope it helps someone else. Cheers, Ivan. PS. I seem to recall having sent this mail months ago. Couldn't find it, though. In case it's been sent twice, I apologise.

On Thu, Jun 14, 2007 at 12:38:27AM +0200, Iván Pérez Domínguez wrote:
Hi everyone,
As we all know, FiniteMap was deprecated, and with GHC-6.6 Data.Map must be used instead. Some function names in Data.Map clash with names in prelude, and Map is usually imported qualified.
Happy generates GLR parsers (-l), but the templates it uses keep calling FiniteMap functions. When Data.Map is imported, it's not imported qualified and some function names are ambiguous.
I've been using a modified template to generate a GLR parser with GHC-6.6 and it seems to work just fine (there are few changes, not a big deal anyway).
I just got the most recent version of Happy and the problem remains, so I applied my changes to GLR_Lib.lhs and ran a diff. The result is attached to this mail.
Hope it helps someone else.
Why don't you just send a darcs patch? That would be easier for everyone :) Stefan

Stefan O'Rear wrote:
On Thu, Jun 14, 2007 at 12:38:27AM +0200, Iván Pérez Domínguez wrote:
Hi everyone,
As we all know, FiniteMap was deprecated, and with GHC-6.6 Data.Map must be used instead. Some function names in Data.Map clash with names in prelude, and Map is usually imported qualified.
Happy generates GLR parsers (-l), but the templates it uses keep calling FiniteMap functions. When Data.Map is imported, it's not imported qualified and some function names are ambiguous.
I've been using a modified template to generate a GLR parser with GHC-6.6 and it seems to work just fine (there are few changes, not a big deal anyway).
I just got the most recent version of Happy and the problem remains, so I applied my changes to GLR_Lib.lhs and ran a diff. The result is attached to this mail.
Hope it helps someone else.
Why don't you just send a darcs patch? That would be easier for everyone :)
Stefan
I'm not familiar with darcs. Shall I use darcs --whatsnew for it? Ivan

On Thu, Jun 14, 2007 at 11:31:23AM +0200, Iván Pérez Domínguez wrote:
Stefan O'Rear wrote:
On Thu, Jun 14, 2007 at 12:38:27AM +0200, Iván Pérez Domínguez wrote:
Hi everyone,
As we all know, FiniteMap was deprecated, and with GHC-6.6 Data.Map must be used instead. Some function names in Data.Map clash with names in prelude, and Map is usually imported qualified.
Happy generates GLR parsers (-l), but the templates it uses keep calling FiniteMap functions. When Data.Map is imported, it's not imported qualified and some function names are ambiguous.
I've been using a modified template to generate a GLR parser with GHC-6.6 and it seems to work just fine (there are few changes, not a big deal anyway).
I just got the most recent version of Happy and the problem remains, so I applied my changes to GLR_Lib.lhs and ran a diff. The result is attached to this mail.
Hope it helps someone else.
Why don't you just send a darcs patch? That would be easier for everyone :)
Stefan
I'm not familiar with darcs. Shall I use darcs --whatsnew for it?
darcs record <pick the changes you wnat> <type a patch name> darcs send <select your patch> No need to attach files, figure out the right email address, etc. Stefan
participants (2)
-
Iván Pérez Domínguez
-
Stefan O'Rear