[Haskell-cafe] Why does instance Ord Pat causes loop

2008-12-08 Thread Martin Hofmann
I am storing the TH data types 'Exp' and 'Pat' in Maps and Sets. As a first attempt to quickly get rid of typechecker's complaints I defined some naive instances of Ord for Exp and Pat. Now it took me about a week to realise, that 'instance Ord Pat' causes ghc to loop. Apparently, there is a

Re: [Haskell-cafe] Why does instance Ord Pat causes loop

2008-12-08 Thread Luke Palmer
On Mon, Dec 8, 2008 at 2:04 AM, Martin Hofmann [EMAIL PROTECTED] wrote: I am storing the TH data types 'Exp' and 'Pat' in Maps and Sets. As a first attempt to quickly get rid of typechecker's complaints I defined some naive instances of Ord for Exp and Pat. Now it took me about a week to

Re: [Haskell-cafe] Why does instance Ord Pat causes loop

2008-12-08 Thread Luke Palmer
On Mon, Dec 8, 2008 at 2:04 AM, Martin Hofmann [EMAIL PROTECTED] wrote: I am storing the TH data types 'Exp' and 'Pat' in Maps and Sets. As a first attempt to quickly get rid of typechecker's complaints I defined some naive instances of Ord for Exp and Pat. Now it took me about a week to

Re: [Haskell-cafe] Why does instance Ord Pat causes loop

2008-12-08 Thread Bulat Ziganshin
Hello Martin, Monday, December 8, 2008, 12:04:06 PM, you wrote: Now it took me about a week to realise, that 'instance Ord Pat' causes ghc to loop. naive Ord instance Ord Exp instance Ord Pat i think you just don't learned this part of Haskell. empty instance declarations like these

Re: [Haskell-cafe] Why does instance Ord Pat causes loop

2008-12-08 Thread Martin Hofmann
Thanks a lot for the quick replies. Indeed that was not clear to me. Cheers, Martin ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Why does instance Ord Pat causes loop

2008-12-08 Thread wren ng thornton
Luke Palmer wrote: It would be nice if typeclass authors could somehow declare the minimal complete definition, so we could get a warning in this case. Or the minimal complete definitions. Since there can be more than one covering set. -- Live well, ~wren