cedille
cedille copied to clipboard
Can't apply erased arguments to kinds imported from parametrized module
Suppose I had a file with the following:
module P (T: โ
) {t: T}.
U : โ
= T.
๐ = โ
.
In a different file where I import this, I can't apply a second argument to ๐
. If I try to make it erased, there's a parse error, and if I don't mark it as erased (which I think is the correct option), there's a "Mismatched argument erasure" error.
import P.
module Q (T: โ
) (t: T).
U' : โ
= U ยทT t. -- works fine
๐' = ๐ ยทT -t -- doesn't work
๐'' = ๐ ยทT t -- doesn't work either
I know I can import a module applied to arguments after the file's module declaration to avoid this error, but my current use-case looks something more like this:
import P.
module Q (T: โ
) {t: T} (R: ๐ ยทT t) {u: U ยทT t}
Out of curiosity I went to find where the error was coming from and it looks like it's here: https://github.com/cedille/cedille/blob/master/src/classify.agda#L736 I think since types effectively ignore whether an erased parameter argument is applied as erased or not (well, you can't apply erased arguments to types at all I suppose), so should kinds...