Re: [Haskell-cafe] Newbie Q: Deriving MyOrd from Eq problem

2006-07-26 Thread Dmitri O.Kondratiev
On 7/25/06, Jared Updike [EMAIL PROTECTED] wrote: I am trying to derive MyOrd class from Eq (Prelude): class Eq a = MyOrd a where (%=), (%), (%=) :: a - a - Bool x %= y = (x y || x == y) x % y = y x x %= y = (y x || x == y) Q: What's wrong? Why 'Ord'

Re: [Haskell-cafe] Newbie Q: Deriving MyOrd from Eq problem

2006-07-26 Thread voigt . 16734551
Hi Dmitri, I don't have answers for all your questions. But some, at least. --- Dmitri O.Kondratiev [EMAIL PROTECTED] wrote: -- Ok, then I can derive MyOrd class directly from Ord: class Ord a = MyOrd a where (%), (%=), (%), (%=) :: a - a - Bool x % y = x y x %= y =

Re: [Haskell-cafe] Newbie Q: Deriving MyOrd from Eq problem

2006-07-26 Thread Daniel Fischer
Am Mittwoch, 26. Juli 2006 16:20 schrieb Dmitri O.Kondratiev: On 7/25/06, Jared Updike [EMAIL PROTECTED] wrote: I am trying to derive MyOrd class from Eq (Prelude): class Eq a = MyOrd a where (%=), (%), (%=) :: a - a - Bool x %= y = (x y || x == y) x % y

Re: [Haskell-cafe] Newbie Q: Deriving MyOrd from Eq problem

2006-07-25 Thread Jared Updike
I am trying to derive MyOrd class from Eq (Prelude): class Eq a = MyOrd a where (%=), (%), (%=) :: a - a - Bool x %= y = (x y || x == y) x % y = y x x %= y = (y x || x == y) Q: What's wrong? Why 'Ord' gets into play here? You are using which is a function

Re: [Haskell-cafe] Newbie Q: Deriving MyOrd from Eq problem

2006-07-25 Thread Jared Updike
Sorry, left out an important verb, *hide*: You can the prelude and thus the Ord class and make your own and You can *hide* the prelude and thus the Ord class and make your own and Jared. -- http://www.updike.org/~jared/ reverse )-: ___

Re: [Haskell-cafe] Newbie Q: Deriving MyOrd from Eq problem

2006-07-25 Thread Bulat Ziganshin
Hello Dmitri, Tuesday, July 25, 2006, 8:15:41 PM, you wrote: class Eq a = MyOrd a where (%=), (%), (%=) :: a - a - Bool x %= y = (x y || x == y) x % y = y x x %= y = (y x || x == y) you are mixing definition of class and its (default) instance. try the

RE: [Haskell-cafe] Newbie Q: Deriving MyOrd from Eq problem

2006-07-25 Thread Ralf Lammel
-cafe- [EMAIL PROTECTED] On Behalf Of Bulat Ziganshin Sent: Tuesday, July 25, 2006 9:46 AM To: Dmitri O.Kondratiev Cc: haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] Newbie Q: Deriving MyOrd from Eq problem Hello Dmitri, Tuesday, July 25, 2006, 8:15:41 PM, you wrote: class Eq