[Haskell-cafe] Client-extensible heterogeneous types (Duck-typed
variadic functions?)
Jacek Generowicz
jacek.generowicz at cern.ch
Fri Oct 15 07:56:24 EDT 2010
On 2010 Oct 15, at 13:32, Jacek Generowicz wrote:
> questions = [ addition 1 2, addition (1%2) (1%3) ]
> My problem is that I don't see where I could add a type signature,
> but still keep
>
> addition :: a -> a -> Question
>
> polymorphic.
Well, OK, I could write
addition 1 (2 :: Int)
inside the question list, but that's rather ugly, and it would be
immensely annoying to have to do this for every specific question.
Is there anywhere else it could go ?
More information about the Haskell-Cafe
mailing list