
On Mon, 2009-07-06 at 17:30 -0400, Samuel Bronson wrote:
According to http://hackage.haskell.org/trac/haskell-prime/wiki/Status, ticket #99 was rejected, but the tickets own page, http://hackage.haskell.org/trac/haskell-prime/ticket/99, says "probably yes". Which is it?
I was about to propose this myself, but decided to check the trac just in case it had already been proposed, Haskell being so popular with smart people and all, and was at first rather disappointed and ready to write an angry rant to the list, then rather confused when I noticed the ticket's page said almost the exact opposite of the Status page.
In particular, I want records to be considered an extension to Haskell', to be implemented only by compilers that care, and even then only allowed with a LANGUAGE pragma like this:
{-# LANGUAGE TraditionalRecordSyntax #-}
For pre-Haskell' compilers, we would want something like:
{-# LANGUAGE NoTraditionalRecordSyntax #-}
which would mean extending the LANGUAGE pragma to support turning extensions off by adding/removing a No from the front of it.
The motivation I suppose is so that people can experiment with other record systems as extensions without having to worry so much about the syntax clashing with the existing syntax. It would have to be clear that it may not be possible to use certain combinations of extensions together. In particular TraditionalRecordSyntax with some future alternative record extension.
Hmm, is it really the case that nobody has proposed LANGUAGE pragmas for Haskell'? I don't see them listed on the Status page.
This we certainly need to do. It's the primary mechanism by which we allow flexibility in the language without breaking all existing code (by letting modules declare which language features they want to turn on or off). For one thing the spec currently says that pragmas cannot change the semantics of the program. That would have to read "apart from the LANGUAGE pragma". Duncan