Description: Add Eq constraints required to build wigh GHC 7.4.1
Author: Joachim Breitner <nomeata@debian.org>

--- haskell-numbers-2009.8.9.orig/Data/Number/Symbolic.hs
+++ haskell-numbers-2009.8.9/Data/Number/Symbolic.hs
@@ -33,7 +33,7 @@ con = Con
 
 -- | The expression @subst x v e@ substitutes the expression @v@ for each
 -- occurence of the variable @x@ in @e@.
-subst :: (Num a) => String -> Sym a -> Sym a -> Sym a
+subst :: (Eq a, Num a) => String -> Sym a -> Sym a -> Sym a
 subst _ _ e@(Con _) = e
 subst x v e@(App x' _ []) | x == x' = v
       	                  | otherwise = e
@@ -65,7 +65,7 @@ instance (Show a) => Show (Sym a) where
     showsPrec p (App f _ xs) =
         showParen (p>10) (foldl (.) (showString f) (map (\ x -> showChar ' ' . showsPrec 11 x) xs))
 
-instance (Num a) => Num (Sym a) where
+instance (Eq a, Num a) => Num (Sym a) where
     x + y         = binOp (+) x "+" y
     x - y         = binOp (-) x "-" y
     x * y         = binOp (*) x "*" y
@@ -74,12 +74,12 @@ instance (Num a) => Num (Sym a) where
     signum x      = unOp signum "signum" x
     fromInteger x = Con (fromInteger x)
 
-instance (Fractional a) => Fractional (Sym a) where
+instance (Eq a, Fractional a) => Fractional (Sym a) where
     x / y          = binOp (/) x "/" y
     fromRational x = Con (fromRational x)
 
 -- Assume the numbers are a field and simplify a little
-binOp :: (Num a) => (a->a->a) -> Sym a -> String -> Sym a -> Sym a
+binOp :: (Eq a, Num a) => (a->a->a) -> Sym a -> String -> Sym a -> Sym a
 binOp f (Con x) _ (Con y) = Con (f x y)
 binOp _ x "+" 0 = x
 binOp _ 0 "+" x = x
@@ -141,7 +141,7 @@ instance (Real a) => Real (Sym a) where
 instance (RealFrac a) => RealFrac (Sym a) where
     properFraction (Con c) = (i, Con c') where (i, c') = properFraction c
 
-instance (Floating a) => Floating (Sym a) where
+instance (Eq a, Show a, Floating a) => Floating (Sym a) where
     pi = var "pi"
     exp = unOp exp "exp"
     sqrt = unOp sqrt "sqrt"
@@ -161,7 +161,7 @@ instance (Floating a) => Floating (Sym a
     atanh = unOp atanh "atanh"
     acosh = unOp acosh "acosh"
 
-instance (RealFloat a) => RealFloat (Sym a) where
+instance (Show a, RealFloat a) => RealFloat (Sym a) where
     floatRadix = floatRadix . unSym
     floatDigits = floatDigits . unSym
     floatRange  = floatRange . unSym
--- haskell-numbers-2009.8.9.orig/Data/Number/Dif.hs
+++ haskell-numbers-2009.8.9/Data/Number/Dif.hs
@@ -36,13 +36,13 @@ dCon x = C x
 -- |The 'dVar' function turns a number into a variable
 -- number.  This is the number with with respect to which
 -- the derivaticve is computed.
-dVar :: (Num a) => a -> Dif a
+dVar :: (Eq a, Num a) => a -> Dif a
 dVar x = D x 1
 
 -- |The 'df' takes a 'Dif' number and returns its first
 -- derivative.  The function can be iterated to to get
 -- higher derivaties.
-df :: (Num a) => Dif a -> Dif a
+df :: (Eq a, Num a) => Dif a -> Dif a
 df (D _ x') = x'
 df (C _   ) = 0
 
@@ -64,11 +64,11 @@ mkDif = D
 -- 
 -- >  deriv f = val . df . f . dVar
 -- 
-deriv :: (Num a, Num b) => (Dif a -> Dif b) -> (a -> b)
+deriv :: (Eq a, Num a, Eq b, Num b) => (Dif a -> Dif b) -> (a -> b)
 deriv f = val . df . f . dVar
 
 -- |Convert a 'Dif' function to an ordinary function.
-unDif :: (Num a) => (Dif a -> Dif b) -> (a -> b)
+unDif :: (Eq a, Num a) => (Dif a -> Dif b) -> (a -> b)
 unDif f = val . f . dVar
 
 instance (Show a) => Show (Dif a) where
@@ -83,7 +83,7 @@ instance (Eq a) => Eq (Dif a) where
 instance (Ord a) => Ord (Dif a) where
     x `compare` y  =  val x `compare` val y
 
-instance (Num a) => Num (Dif a) where
+instance (Eq a, Num a) => Num (Dif a) where
     (C x)    + (C y)         =  C (x + y)
     (C x)    + (D y y')      =  D (x + y) y'
     (D x x') + (C y)         =  D (x + y) x'
@@ -115,18 +115,18 @@ instance (Num a) => Num (Dif a) where
     signum (C x)             =  C (signum x)
     signum (D x _)           =  C (signum x)
 
-instance (Fractional a) => Fractional (Dif a) where
+instance (Eq a, Fractional a) => Fractional (Dif a) where
     recip (C x)    = C (recip x)
     recip (D x x') = ip
 	where ip = D (recip x) (-x' * ip * ip)
     fromRational r = C (fromRational r)
 
-lift :: (Num a) => [a -> a] -> Dif a -> Dif a
+lift :: (Eq a, Num a) => [a -> a] -> Dif a -> Dif a
 lift (f : _) (C x) = C (f x)
 lift (f : f') p@(D x x') = D (f x) (x' * lift f' p)
 lift _ _ = error "lift"
 
-instance (Floating a) => Floating (Dif a) where
+instance (Eq a, Floating a) => Floating (Dif a) where
     pi               = C pi
 
     exp (C x)        = C (exp x)
