flexible contexts and context reduction

Sittampalam, Ganesh ganesh.sittampalam at credit-suisse.com
Thu Mar 27 05:06:52 EDT 2008


Well, Ord Foo doesn't hold, does it? So Ord (a, b) isn't equivalent to (Ord a, Ord b).

Ganesh

-----Original Message-----
From: Simon Peyton-Jones [mailto:simonpj at microsoft.com] 
Sent: 27 March 2008 09:05
To: Sittampalam, Ganesh; 'Tom Schrijvers'; Ganesh Sittampalam
Cc: glasgow-haskell-users at haskell.org; Martin Sulzmann
Subject: RE: flexible contexts and context reduction

Why "unfortunately"? Looks fine to me.

Simon

|
| Unfortunately, GHC accepts the following:
|
| {-# LANGUAGE FlexibleInstances #-}
| module Foo2 where
|
| data Foo = Foo
|   deriving Eq
|
| instance Ord (Foo, Foo) where
|   (Foo, Foo) < (Foo, Foo) = False

==============================================================================
Please access the attached hyperlink for an important electronic communications disclaimer: 

http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
==============================================================================



More information about the Glasgow-haskell-users mailing list