[Haskell-cafe] Fixing undeduceable instance == overlapping instance

2013-02-23 Thread Michael Orlitzky
I'm trying to write a determinant function that works on matrices parameterized by their dimensions (Peano naturals). If I declare the following, -- Define a class so that we get a different determinant function -- on the base/recursive cases. class (Eq a, Ring.C a) = Determined m a where

Re: [Haskell-cafe] Fixing undeduceable instance == overlapping instance

2013-02-23 Thread Karl Voelker
On Sat, Feb 23, 2013 at 10:28 PM, Michael Orlitzky mich...@orlitzky.comwrote: -- Recursive case, (n+2) x (n+2) matrices. instance (Eq a, Ring.C a, Arity n) = Determined (Mat (S (S n)) (S (S n))) a where determinant m = ... -- Recursive algorithm, the i,jth minor has

Re: [Haskell-cafe] Fixing undeduceable instance == overlapping instance

2013-02-23 Thread Michael Orlitzky
On 02/24/2013 02:14 AM, Karl Voelker wrote: On Sat, Feb 23, 2013 at 10:28 PM, Michael Orlitzky mich...@orlitzky.com mailto:mich...@orlitzky.com wrote: -- Recursive case, (n+2) x (n+2) matrices. instance (Eq a, Ring.C a, Arity n) = Determined (Mat (S (S n)) (S (S

Re: instance overlapping

1999-07-18 Thread Wolfram Kahl
Nguyen Phan Dung [EMAIL PROTECTED] writes: If I have the following declaration: class Soup where ... instance Soup String where ... instance Soup t = Soup [t] where ... This will lead to an error: "instance overlapping". Is there anyway to solve t

instance overlapping

1999-07-18 Thread Nguyen Phan Dung
Hi, If I have the folowwing declaration: class Soup where ... instance Soup String where ... instance Soup t = Soup [t] where ... This will lead to an error: "instance overlapping". Is there anyway to solve this? (I could not make an instance for Char) Thank you very much ! Phan Dung.

Re: instance overlapping

1999-07-18 Thread Daniel Russell
Hi, If I have the folowwing declaration: class Soup where ... instance Soup String where ... instance Soup t = Soup [t] where ... This will lead to an error: "instance overlapping". Is there anyway to solve this? Yes -- if you are using Hugs98 then you need to use the command l