[Haskell-cafe] order of arguments matters

Roel van Dijk vandijk.roel at gmail.com
Fri Mar 18 10:22:07 CET 2011

I believe this is caused by type equalities that are introduced by the
Type a argument. In tr2 you get something like a ~ Int or a ~ String,
allowing the function to type check. In tr1 that equality is never
introduced so the type checker thinks a and Int are distinct types.

But I'm sure someone else can provide a better (more correct) explanation.

More information about the Haskell-Cafe mailing list