mirror of
https://github.com/unisonweb/unison.git
synced 2024-09-25 01:08:30 +03:00
eac377537a
- 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
29 lines
432 B
Plaintext
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} '()
|
|
--
|