
пDear GHC team, ghc-7.0.1 assumes that Integral includes Show, and ghc-7.4.0.20111219 does not assume this. Which one agrees with Haskell-2010 ? Regards, ------ Sergei mechvel@botik.ru

7.0.x agrees with the standard.
The change, however, was a deliberate _break_ with the standard that passed through the library review process a few months ago, and is now making its way out into the wild.
The simplest fix is to simply add an Eq or Show constraint to the few functions that need them and which had been constrained by Num, or in your case Integral.
The resulting code will then be compatible with both GHC and Haskell 2010, where it will simply ignore the extra constraint, but it permits folks who want Num instances for free modules such as functions to not have to lie claiming that they can show the function or compare them for equality.
Sent from my iPhone
On Dec 22, 2011, at 9:52 AM, "Serge D. Mechveliani"
пDear GHC team,
ghc-7.0.1 assumes that Integral includes Show, and ghc-7.4.0.20111219 does not assume this.
Which one agrees with Haskell-2010 ?
Regards,
------ Sergei mechvel@botik.ru
_______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

2011/12/22 Edward Kmett
The change, however, was a deliberate _break_ with the standard that passed through the library review process a few months ago, and is now making its way out into the wild.
Is it reasonable to enquire how many standard-compliant implementations of Haskell there are? /g -- "I’m surprised you haven’t got a little purple space dog, just to ram home what an intergalactic wag you are."

| 2011/12/22 Edward Kmett

On 12/22/11 2:28 PM, J. Garrett Morris wrote:
2011/12/22 Edward Kmett
: The change, however, was a deliberate _break_ with the standard that passed through the library review process a few months ago, and is now making its way out into the wild.
Is it reasonable to enquire how many standard-compliant implementations of Haskell there are?
I believe the answer is (or on release of 7.4 will become) zero, unless UHC is fully compliant. I seem to recall that GHC already had other infelicities wrt the report, unless those had been fixed when I wasn't looking. However, this is (to some extent) inevitable, because the haskell' process desires that things be already implemented before they are considered for inclusion in the new standard. IIRC, the desire to explicitly break from h2010 in this regard is as a preamble to getting the change into h2012 or h2013. Unfortunately, due to how typeclasses are defined there's no way to simultaneously implement the current standard and the desired new standard in such a way that the two will be able to interact (instead of duplicating all intersecting code so as to compile separately against both standards). While the requirement to state Eq and Show is a burden wrt the old standard, it is fully compatible with it. -- Live well, ~wren
participants (5)
-
Edward Kmett
-
J. Garrett Morris
-
Serge D. Mechveliani
-
Simon Peyton-Jones
-
wren ng thornton