Hmm, I never knew that. Is that a GHC thing? Is it strictly necessary? Seems like it could be done in the Num instance for Integers, Ints, etc.
On Fri, May 8, 2009 at 11:51 AM, Neil Mitchell <ndmitch...@gmail.com> wrote: > > Err, I'm not seeing the danger of this > > (+) :: forall a. (Num a) => a -> a -> a > > Doesn't this require the two parameters to be the same instance of Num? > > I didn't at first, then I remembered: > > 1 + True > = > fromInteger 1 + True > > And if we have Num for Bool, it type checks. > > Thanks > > Neil >
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe