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
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
(*) = ivMult
negate = ivNegate
......@@ -54,13 +54,11 @@ instance (Num a,Ord a,Eq a,Show{-was:Text-} a) => Num (Interval a) where
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
fromRational = ivFromRational
-- instance (Fractional a,Ord a,Floating a) => - not this ?
instance (RealFloat a) =>
Floating (Interval a) where
instance (Show a, RealFloat a) => Floating (Interval a) where
pi = Pt pi
exp = ivExp
log = ivLog
......@@ -251,5 +249,3 @@ unpt (Pt a) = a
mid1 (a :#: b) = Pt (a + (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