Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
A single wildcard for n-ary type constructors #6374
Original bug ID: 6374
I propose to accept the type expression "_ t" when "t" is a type constructor with more than one argument. This makes it easier, for instance, to write:
("%s" : _ format)
and this is very coherent with the behavior of patterns on n-ary constructors.
I attach a trivial patch.
A further motivation is for the work on inlined records (#5528): the implicit inner record types are given type variables derived from the free variables in the record definition. It's better if one can add a type annotation on those t.A record types without having to care about their exact arity.
I'll commit this patch in a few days unless someone objects to it.