Hi Chris,

On 19 March 2012 17:58, Chris Smith <[email protected]> wrote:

> On Mar 19, 2012 11:40 AM, "Ozgur Akgun" <[email protected]> wrote:
> > {-# LANGUAGE FlexibleInstances #-}
> >
> > instance Num a => Num (a -> a) where
>
> You don't want (a -> a) there.  You want (b -> a).  There is nothing about
> this that requires functions to come from a numeric type, much less the
> same one.
>
Thanks for catching this one, you are absolutely correct. I was carried
away by the original post using "Float -> Float" for the example functions.

Cheers,
Ozgur
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to