links
links copied to clipboard
Wild can appear multiple times with different presence types
The following example illustrates the bug
sig f : (() {wild:Bool |e}~> ()) {wild:Int |e}~> () fun f(g) { g() };
f = fun : (() ~a~> ()) ~a~> ()
Here wild appears twice in each row, and moreover, it appears at incompatible presence types Bool and Int with the same effect variable e. I think this issue might have to be solved in the parser since the semantic actions for squiggly_arrow inserts wild:(), which overrides the user-written wild:Bool and wild:Int.
It turns out this is a special case of a more general issue of how Sugartypes rows are translated into Types rows. The translation does not check for duplicate labels. I think in order to fix this issue correctly we first need to fix #681.