Closed gteege closed 4 years ago
Here's a simplified test case which also causes the issue.
type A
type G a
f : (G A)! -> (G A)!
f r = (\s => s) r
The issue is roughly caused because the core type inference infers the type (G A)! -> (G A)!
for the function, but the argument has the type (G A!)!
after is has been converted from the surface types.
Indeed, changing the example to
type A
type G a
f : (G A!)! -> (G A!)!
f r = (\s => s) r
prevents the error from occuring.
The issue seems caused by the surface to core translation being incorrect at some point.
The following code
causes the error message:
The error disappears when one of the conditions is simplified, or when the lambda expression is replaced by a seperate toplevel defined function.