Commits

Bryan O'Sullivan committed 4fe5967

Fix fake-broken DotNetTime test

  • Participants
  • Parent commits 9b36b7f

Comments (0)

Files changed (2)

File tests/Instances.hs

     a =~ b = ((==) `on` utctDay) a b &&
              (approxEqWith 1 1 `on` ((* 1e3) . utctDayTime)) a b
 
-instance ApproxEq DotNetTime
+instance ApproxEq DotNetTime where
+    (=~) = (=~) `on` fromDotNetTime
 
 instance ApproxEq Double where
     (=~) = approxEq

File tests/Types.hs

-{-# LANGUAGE DefaultSignatures, DeriveDataTypeable, DeriveGeneric,
+{-# LANGUAGE DeriveDataTypeable, DeriveGeneric,
     GeneralizedNewtypeDeriving #-}
 
 module Types where
 class ApproxEq a where
     (=~) :: a -> a -> Bool
 
-    default (=~) :: (Eq a) => a -> a -> Bool
-    (=~) = (==)
-
 newtype Approx a = Approx { fromApprox :: a }
     deriving (Show, Data, Typeable, Generic, ApproxEq, Num)