adding instances to (,)

1995-07-24 Thread Sergei D. Meshveliani
Dear sir, I had written several pages of Haskell scripts, tried HUGS Haskell on them, debugged, and now I'm trying to complile the stuff with Glasgow Haskell. ghc-0.25 dislikes the following declarations: - module M where instance (Num a, Num b) =>

Re: adding instances to (,)

1995-07-24 Thread peterson-john
Your error messages from ghc are correct: you have violated the infamous C-T rule (section 4.3.2, page 32) which restricts instance declarations to the module containing either the class or the datatype. Since (,) and Num are both in the prelude, you can't compile this in official Haskell 1.2.