
On Thu, 6 Dec 2007, Henning Thielemann wrote:
On Thu, 6 Dec 2007, Thomas Hartman wrote:
On a related note... is there some easy way to be sure that a program I am compiling uses only haskell 98? (Because any pure haskell 98 should always compile on yhc... right?)
You can for instance use 'haskell98' as dependent package instead of 'base' in the Cabal description. If you import other modules, I don't know how to check that these are Haskell 98. I weakly remember corner cases where GHC accepts more than Haskell 98 in Haskell 98 mode. (At least it sometimes suggests fixes for errors that are not Haskell 98, e.g. class constraints in signatures. :-)
Now I have an example: GHC-6.4.1 accepts multi parameter type class constraints without '-fglasgow-exts'.
I compile this with ghc, no options, and iIt doesn't have any {-#-#} options, so according to what I understand, it is using pure haskell 98. So I might think this was a candidate for using on yhc.
I could not always pass a GHC-certified module to Hugs or even Haddock. I remember there is some difference with respect to the trailing 'where' in the 'instance' head, if the instance declaration is empty. Haddock expect some spaces in infix operators (I believe ( # ) instead of (#)), which are not required by Hugs and GHC.