FW: 7.4.1-pre: Show & Integral
iavor.diatchki at gmail.com
Sat Dec 24 18:32:45 CET 2011
The discussion on the libraries list is archived here:
There hasn't been a corresponding discussion for Haskell Prime so,
technically, GHC deviates from the standard.
On Fri, Dec 23, 2011 at 9:41 AM, Simon Peyton-Jones
<simonpj at microsoft.com> wrote:
> I'm confused too. I'd welcome clarification from the Haskell Prime folk.
> -----Original Message-----
> From: Serge D. Mechveliani [mailto:mechvel at botik.ru]
> Sent: 23 December 2011 17:36
> To: Simon Peyton-Jones
> Subject: Re: 7.4.1-pre: Show & Integral
> On Thu, Dec 22, 2011 at 08:14:54PM +0000, Simon Peyton-Jones wrote:
>> | 2011/12/22 Edward Kmett <ekmett at gmail.com>:
>> | > 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?
>> Just to be clear, the change IS the standard. GHC has to change to be compliant.
>> At least that's how I understand it.
> I am confused.
> I am looking now at the on-line specification of Haskell-2010,
> 6.3 Standard Haskell Classes.
> It shows that Integral includes Show:
> Eq Show
> \ /
> Enum Real
> \ |
> This is also visible in the further standard class declarations in this chapter.
> Hence, for `x :: Integral a => a' it is correct to write (shows x "").
> And ghc-184.108.40.20611219 does not allow this.
> So, ghc-220.127.116.1111219 breaks the 2010 standard. Now, Edward Kmett writes that
> this break is done deliberately.
> Am I missing something?
> I witness this for the first time: that GHC deliberately breaks the current
> Haskell standard.
> Probably, many people (as myself) dislike this point of the standard.
> Well, they can write a dummy Show implementation for their type T:
> showsPrec _ _ = showString "(<t> :: T)",
> and wait for an improved standard, say, Haskell-II
> -- ?
> mechvel at botik.ru
> Haskell-prime mailing list
> Haskell-prime at haskell.org
More information about the Haskell-prime