
Bulat Ziganshin wrote:
Hello Maxime,
Saturday, April 14, 2007, 11:57:02 PM, you wrote:
It would be nice if it was possible to conditionally include this code, depending on whether the compiler supports FDs and MPTCs. I guess it would be doable using the -cpp flag of GHC and using #if's, but then again, maybe other compilers don't have this feature? I didn't check but it seems unlikely that this would be part of Haskell98.
it's not. moreover, probably MPTC will be a part of Haskell', but not FD - there is new Associated Types extension that tends to replace it (which is available now only in GHC 6.7 in rather early form)
Yeah, I've seen that, Associated Types look really cool. I'm currently toying with it, rewriting the MonadState class with Associated Types. I'm waiting for GHC HEAD to finish building in order to test that code. In case you're bored: http://hpaste.org/1413.
I'll have to do some research to see if there are any other ways we could deal with this issue, and I'm all ears if people have suggestions on this. As a side note, we're going to need MPTCs and FDs if the SoC task of having a GenParserT monad transformer succeeds, so this definitely needs some thinking.
another SoC project is to rewrite yhc/nhc type checker which will open possibility to implement mptc/fd (like any other type extensions) in nhc. but this is the long way and not guaranteed
overall, if you need fd, then you are in hugs/ghc land. it's not much problem if something implemented as SoC project will work only with these two compilers (actually, most libs are only ghc-compatible, ParseC and ByteString are rare exceptions)
Thanks for the information. Am I correct in interpreting this as that you are not opposed to adding the mtl dependency on Parsec? Or that you'd rather wait for mtl to be rewritten without FDs and included in the Haskell standard before we use it there? :-) Cheers, Maxime