unison/unison-src/tests/delay_parse.uu
Chris Gibbs eac377537a A few failing typechecker tests
- tests/delay_parse.uu - () -> {T} '() does not parse - interaction between the ' and the {T}
- tests/match_unit.uu - can't match on () in a pattern
- tests/hole.u - holes don't seem to be supported yet
- errors/effect_unknown_type.uu - no error when using an unknown type in an effect declaration

These are the things I found while getting the following to compile, which it now does! :-)  It's a sketch of how the Remote API might break down in to constituent effects.

https://gist.github.com/atacratic/99fb707a7cb96bcd714cc1c024a7e08e
2018-08-26 21:14:32 +01:00

29 lines
432 B
Plaintext

effect T where
foo : {T} ()
-- parses fine
a : () -> {T} ()
a x = ()
-- parses fine
b : () -> '()
b = x -> (y -> ())
-- parse error
c : () -> {T} '()
c = x -> (y -> ())
-- parses fine with extra parentheses
d : () -> {T} ('())
d = x -> (y -> ())
()
-- c hits the following error:
--
-- typechecker.tests/delay_parse.u FAILURE tests/delay_parse.u:13:15:
-- unexpected '
-- expecting ( or [
-- 13 | c : () -> {T} '()
--