Commit 7bdf62ee authored by dterei's avatar dterei

More fixes for Eq, Num changes.

parent 3fc769af
...@@ -45,7 +45,7 @@ instance (Ord a) => Ord (Interval a) where ...@@ -45,7 +45,7 @@ instance (Ord a) => Ord (Interval a) where
max = ivMax max = ivMax
instance (Num a,Ord a,Eq a,Show{-was:Text-} a) => Num (Interval a) where instance (Num a, Ord a, Eq a, Show a) => Num (Interval a) where
(+) = ivPlus (+) = ivPlus
(*) = ivMult (*) = ivMult
negate = ivNegate negate = ivNegate
...@@ -54,13 +54,11 @@ instance (Num a,Ord a,Eq a,Show{-was:Text-} a) => Num (Interval a) where ...@@ -54,13 +54,11 @@ instance (Num a,Ord a,Eq a,Show{-was:Text-} a) => Num (Interval a) where
fromInteger = ivFromInteger fromInteger = ivFromInteger
instance (Num a,Ord a,Fractional a) => Fractional (Interval a) where instance (Show a, Num a, Ord a, Fractional a) => Fractional (Interval a) where
(/) = ivDiv (/) = ivDiv
fromRational = ivFromRational fromRational = ivFromRational
-- instance (Fractional a,Ord a,Floating a) => - not this ? instance (Show a, RealFloat a) => Floating (Interval a) where
instance (RealFloat a) =>
Floating (Interval a) where
pi = Pt pi pi = Pt pi
exp = ivExp exp = ivExp
log = ivLog log = ivLog
...@@ -82,10 +80,10 @@ instance (RealFloat a) => ...@@ -82,10 +80,10 @@ instance (RealFloat a) =>
-- Error functions - un-used. -- Error functions - un-used.
error0 = error "Not implemented." error0 = error "Not implemented."
error1 a = error "Not implemented." error1 a = error "Not implemented."
error2 a b = error "Not implemented." error2 a b = error "Not implemented."
error3 a b c = error "Not implemented." error3 a b c = error "Not implemented."
error4 a b c d = error "Not implemented." error4 a b c d = error "Not implemented."
...@@ -251,5 +249,3 @@ unpt (Pt a) = a ...@@ -251,5 +249,3 @@ unpt (Pt a) = a
mid1 (a :#: b) = Pt (a + (b-a)/3) mid1 (a :#: b) = Pt (a + (b-a)/3)
mid2 (a :#: b) = Pt (b - (b-a)/3) mid2 (a :#: b) = Pt (b - (b-a)/3)
-- END --
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment