
In article
I assume that these function are for computations like subtract :: DegreeCentigrade -> Kelvin -> DegreeCentigrade diff :: DegreeCentigrade -> DegreeCentigrade -> Kelvin and the intentions are different enough to implement distinct functions. I assume that there will be an implementation for 'diff' whenever there is one for 'subtract' and vice versa, thus considering them as different instances of the same class does not seem to be a good design.
They're actually for time: diffAbsoluteTime :: AbsoluteTime -> AbsoluteTime -> DiffTime diffUTCTime :: UTCTime -> UTCTime -> UTCDiffTime Ideally I'd make a two-parameter class, e.g. "class Diff diff abs | abs -> diff" which would have all three functions, but I'm sticking with Haskell 98 (plus FFI only) for portability. -- Ashley Yakeley, Seattle WA