links icon indicating copy to clipboard operation
links copied to clipboard

Kind inference

Open dhil opened this issue 1 year ago • 0 comments

In the absence of a kind annotation Links assumes that a given type variable has kind Type. Consequently, one must explicitly declare the kinds of type variables with kinds other than Type in type aliases, and one must use the appropriate explicit syntax for these type variables in type applications, e.g.

typename Id(a, e::Eff) = (a) ~e~> a;

sig id : Id(a, { |e})
fun id(x) { x }

In this example, the necessary kind information is easily inferable. Therefore it would be convenient to be able to write the following instead

typename Id(a, e) = (a) ~e~> a;

sig id : Id(a, e)
fun id(x) { x }

dhil avatar Jul 22 '22 11:07 dhil