On 20/01/2011 20:22, Axel Simon wrote:

In the case of the layout "bug", I think it might be worth considering
going the other way: adjusting the standard with what ghc has always
done. If I understand correctly, all my code using:

foo = do
some computation
trace "I am here" $ do
some more computation

will break. I use this style of coding a lot to avoid too much
indentation and thus I would have to enable this extension everywhere
(and get warnings (or errors?) for older ghcs). Even if we had 2 or 3
implementations of Haskell 2010 in a decade, then they might not have
this extension. Furthermore, if they claim they actually do implement
the layout extension then they still might get it wrong in some subtle
way. An extension is never as well exercised as the non-extension part
of the compiler. I therefore think that keeping the number of extensions
to a minimum should be a high priority. It seems that the ghc team is
going overboard with the amount of extensions and their granularity that
I do not believe that there will ever be another compiler since
implementing all these extensions is a nightmare. The road of may
extensions is leading down the road that the Haskell standards aimed to
avoid: having a single implementation defining what a Haskell program
can be.

So, again, for this particular "extension" I suggest that the layout
rule in the standard(s) should be revised -- if I'm mistaken, this will
not break other programs.

You've convinced me. The benefit from "fixing" GHC in this case is outweighed by the cost, I think we should revert the change (or at least enable RelaxedLayout by default), and propose the change for Haskell 2011/2012. Ian, Simon, what do you think?

Cheers,
        Simon

_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to