Agus Zubiaga
ca7697db91
update mono tests: ids increase because of new fx vars
2024-11-07 18:54:22 -03:00
Agus Zubiaga
5f5e123bfd
Expect only one problem in test_can::shadow_annotation
...
This is because the NoIdentifiersIntroduced error was moved
to the type checker.
2024-11-07 18:54:22 -03:00
Agus Zubiaga
a2f940be4e
Use byte literal instead of cast and ignore too_many_args
2024-11-07 18:54:22 -03:00
Agus Zubiaga
c9f001b041
Allow ignored defs with an effectful RHS
2024-11-07 18:54:22 -03:00
Agus Zubiaga
175a2b5683
Add hint about forgetting to call a function
2024-11-07 18:54:21 -03:00
Agus Zubiaga
cfc4be5254
Treat untyped suffixed functions as effectful
2024-11-07 18:54:21 -03:00
Agus Zubiaga
af6fc6306f
Treat untyped unsuffixed functions as pure
2024-11-07 18:54:21 -03:00
Agus Zubiaga
70fa4d036c
Test opaque destructure suffixes
2024-11-07 18:54:21 -03:00
Agus Zubiaga
a0783c3132
Test tag destructure suffixes
2024-11-07 18:54:21 -03:00
Agus Zubiaga
2c208f9389
Test tuple destructure suffixes
2024-11-07 18:54:20 -03:00
Agus Zubiaga
e75b1cf7a0
Check suffixes of all pattern identifiers
2024-11-07 18:54:20 -03:00
Agus Zubiaga
a31a35100b
Report suffixed pure function in literal record field
2024-11-07 18:54:20 -03:00
Agus Zubiaga
215de707fa
Report unsuffixed record literal field with effectful function
2024-11-07 18:54:20 -03:00
Agus Zubiaga
ea35094b28
Remove flex var case when checking symbol suffix
2024-11-07 18:54:20 -03:00
Agus Zubiaga
2859829ea8
Mark flex fx vars as pure after solving body
2024-11-07 18:54:19 -03:00
Agus Zubiaga
89a918cebe
Fix unifying pure with flex vars
2024-11-07 18:54:19 -03:00
Agus Zubiaga
6533e9084d
Add fx to ErrorType
2024-11-07 18:54:19 -03:00
Agus Zubiaga
8a65617704
Effectful function in docs
2024-11-07 18:54:19 -03:00
Agus Zubiaga
28f35edb2c
Add Pure/Effectful content to checkmate
2024-11-07 18:54:19 -03:00
Agus Zubiaga
025600c6a7
Fix non-sensical error message
2024-11-07 18:54:18 -03:00
Agus Zubiaga
31bc3670df
Ignore errors in statement checks
2024-11-07 18:54:18 -03:00
Agus Zubiaga
9a5a5c3462
Remove irrelevant todos
2024-11-07 18:54:18 -03:00
Agus Zubiaga
6adc6d9168
Report ignored statement results
2024-11-07 18:54:18 -03:00
Agus Zubiaga
b01771c5ae
Show effectful function name in mismatches
2024-11-07 18:54:18 -03:00
Agus Zubiaga
f666dba67d
Report effectful top-level exprs
2024-11-07 18:54:17 -03:00
Agus Zubiaga
b62665e49e
Report effectful statement in pure function
2024-11-07 18:54:17 -03:00
Agus Zubiaga
fd2493ee51
Report effect call in pure function
2024-11-07 18:54:17 -03:00
Agus Zubiaga
839078b5d1
Test aliased unsuffixed effectful function
2024-11-07 18:54:17 -03:00
Agus Zubiaga
d22b2a79f5
Suffixed pure function warning
2024-11-07 18:54:17 -03:00
Agus Zubiaga
1da8af390b
Unsuffixed effectul function warning
2024-11-07 18:54:16 -03:00
Agus Zubiaga
75856ae804
Support !
in symbols provided to host
2024-11-07 18:54:16 -03:00
Agus Zubiaga
b80f44738f
Switch fx mode based on platform main too
2024-11-07 18:54:16 -03:00
Agus Zubiaga
2c8571537e
Get suffix from IdentId or Symbol
...
IdentId will now reserve the MSB for flagging whether the ident
is suffixed with a `!`.
We will use this later to constrain identifiers to be effectful or pure.
2024-11-07 18:54:16 -03:00
Agus Zubiaga
69e026f8bb
Leftover statement warning for pure statements
2024-11-07 18:54:16 -03:00
Agus Zubiaga
6e6382ab23
Canonicalize and constrain statement expr in purity inference mode
2024-11-07 18:54:15 -03:00
Agus Zubiaga
460fa693fd
Desugar stmt expr before checking whether it's suffixed
2024-11-07 18:54:15 -03:00
Agus Zubiaga
01c94050c8
Detect fx mode based on hosted module
2024-11-07 18:54:15 -03:00
Agus Zubiaga
fd3fb16f7a
Add TODO to remove TryTarget::Task
2024-11-07 18:54:15 -03:00
Agus Zubiaga
8bde68cc5e
Restore parsing !
suffix
...
This reverts commit 52896d9fa65141df832989b326f526cbedf67341.
We actually still need this for when `!` follows a non-ident expr
2024-11-07 18:54:15 -03:00
Agus Zubiaga
aeeaab4b99
Desugar idents ending in !
to TrySuffix
2024-11-07 18:54:14 -03:00
Agus Zubiaga
56cdc749af
Do not attempt to parse !
suffix
2024-11-07 18:54:14 -03:00
Agus Zubiaga
7a7650c11d
Parse lowercase idents ending in !
2024-11-07 18:54:14 -03:00
Agus Zubiaga
2cce5ad023
Allow unsuffixed statements in parser
...
Moves the "STATEMENT AFTER EXPRESSION" error from the parser to canonicalization.
We'll later use this to allow this case in effectful functions.
2024-11-07 18:54:14 -03:00
Agus Zubiaga
f677592f97
Ignore unused fx vars in mono
2024-11-07 18:54:14 -03:00
Agus Zubiaga
bc3ab0186a
Generate effectful hosted functions
2024-11-07 18:54:13 -03:00
Agus Zubiaga
7af05cc6c9
Constrain function annotation fx to body
2024-11-07 18:54:13 -03:00
Agus Zubiaga
b9b85a222f
Do not use const fx vars when canonicalizing annotations
2024-11-07 18:54:13 -03:00
Agus Zubiaga
7776883262
Unify functions fx vars
2024-11-07 18:54:13 -03:00
Agus Zubiaga
5a5abe3bc5
Unify call's fx var with that of the enclosing function
2024-11-07 18:54:12 -03:00
Agus Zubiaga
7871ba182d
Remove irrelevant TODO
2024-11-07 18:54:12 -03:00