Sequence literals contain lower expressions. So naturally, we need to modify the subparser for lower expressions to account for
pi type literals (even though they are invalid in this context). NB: We currently already do such gymnastics in the subparser for (de-)applications. Either we are forced to "duplicate" the logic (creating a helper function) or even better might be able to just move the logic from the application-subparser to the subparser for lower expressions.
Example 0
main = ['(n: Int) -> Int]
Current subpar output:
error[E010]: found `'`, but expected expression
--> playground/wer.lushui:1:9
|
1 | main = ['(n: Int) -> Int]
| ^ unexpected token
|
Example 1
main = [(n: Int) -> Int]
Current subpar output:
error[E010]: found `:`, but expected `)`
--> playground/wer.lushui:1:11
|
1 | main = [(n: Int) -> Int]
| ^ unexpected token
|
Sequence literals contain lower expressions. So naturally, we need to modify the subparser for lower expressions to account for pi type literals (even though they are invalid in this context). NB: We currently already do such gymnastics in the subparser for (de-)applications. Either we are forced to "duplicate" the logic (creating a helper function) or even better might be able to just move the logic from the application-subparser to the subparser for lower expressions.
Example 0
Current subpar output:
Example 1
Current subpar output:
Example 2