[Haskell-cafe] Haskell record extension?
Bulat Ziganshin
bulat.ziganshin at gmail.com
Sat Jun 16 09:27:57 EDT 2007
Hello bf3,
Saturday, June 16, 2007, 3:24:06 PM, you wrote:
> However, I never understood why Haskell doesn't permit the same name for a
> function acting on different types, even without using type classes. Must be
> some deeper reason for it (currying?)
i guess because it makes type inference problematic. imagine 10
overloaded functions used together:
func = a.b.c.d.e.f.g.h.i.j
it will create 2^10 variants to check and make error messages very
verbose (or non-informative). with type classes, you give common name
to all the type variants you want to overload. at least, this
simplifies error messages :)
--
Best regards,
Bulat mailto:Bulat.Ziganshin at gmail.com
More information about the Haskell-Cafe
mailing list