[Haskell-cafe] Polymorphic addition function with variable number of arguments?

Johannes Waldmann waldmann at imn.htwk-leipzig.de
Tue Mar 13 20:30:50 CET 2012


> Can someone tell me why this is not working 

that "someone" is actually ghci:

Prelude> instance (Num a, Add a b) => Add (a -> b) where add x y = add (x + y)

<interactive>:8:30:
    Expecting one more argument to `Add (a -> b)'
    In the instance declaration for `Add (a -> b)'






More information about the Haskell-Cafe mailing list