[Haskell-cafe] A type class puzzle
haskell at sleepingsquirrel.org
Tue Oct 31 15:31:55 EST 2006
Nicolas Frisby wrote:
> On 10/31/06, Greg Buchholz <haskell at sleepingsquirrel.org> wrote:
> >...That first article is the strangest. I couldn't reconcile the fact
> >that if our type signature specifies two arguments, we can pattern
> >match on three arguments in the function definition. Compare the number
> >of arguments in the first and second instances...
> Connor McBride's "Faking It: Simulating Dependent Types in Haskell"
> It might help; your example makes me think of the "nthFirst" function.
> If it's different, I'md wager the polyvariadic stuff and nthFirst can
> be reconciled on some level.
Does that explain how, why, or when you can use more arguments than
you are allowed to use? Or is it just another example of "using more
arguments than you are allowed to use"? Is this a Haskell 98 thing, or
is it related to MPTCs, or fun deps, or something else?
More information about the Haskell-Cafe