Commit Graph

350 Commits

Author SHA1 Message Date
Ayaz Hafiz
98869b557d Exhaustive and redundant marks 2022-04-28 20:33:48 -04:00
Folkert
fb9d60226d
store `exposed_ident_ids in the scope itself 2022-04-28 20:30:02 +02:00
Ayaz Hafiz
752b3ee042
Bugfix merge conflicts 2022-04-25 19:04:10 -04:00
Ayaz Hafiz
17e7b10267
Fought against clippy and lost 2022-04-25 19:04:09 -04:00
Ayaz Hafiz
7d908dc99c
Remove unused line 2022-04-25 19:04:09 -04:00
Ayaz Hafiz
85e3373d8b
Move exhaustiveness checking to type checking 2022-04-25 19:04:09 -04:00
Ayaz Hafiz
f7e04490c0
Remove stale comment 2022-04-25 19:04:09 -04:00
Ayaz Hafiz
356616d834
Move exhaustiveness checking to type solving phase with solve tests 2022-04-25 19:04:08 -04:00
Ayaz Hafiz
e73ebfba3e
Add a way to view solved types of arbitrary expressions/patterns in a program 2022-04-25 19:03:25 -04:00
Ayaz Hafiz
b6383f81ee
Numbers are opaques 2022-04-25 10:59:42 -04:00
Ayaz Hafiz
f94d91b8ab
Fix region and save an alloc 2022-04-24 10:25:32 -04:00
Ayaz Hafiz
cd89902e7a
Smarter about region calculation 2022-04-24 10:19:47 -04:00
Ayaz Hafiz
9a341e3d75
Improve non-exhaustive typechecking errors
We will replace this with proper exhaustiveness checking when we have
that in the typechecking phase, but for now this should do.
2022-04-23 10:56:54 -04:00
Ayaz Hafiz
633bdd5520
Fix failing reporting tests 2022-04-23 10:56:54 -04:00
Ayaz Hafiz
44aa1fca1c
s/constriants/constraints/g 2022-04-23 10:56:53 -04:00
Ayaz Hafiz
627d73e4c0
Clippy 2022-04-23 10:56:53 -04:00
Ayaz Hafiz
504c3f9b49
Delay add "is open" constraint until we know a type variable 2022-04-23 10:56:53 -04:00
Ayaz Hafiz
7b2b41869f
Add a way to view solved types of arbitrary expressions/patterns in a program 2022-04-23 10:56:53 -04:00
Ayaz Hafiz
0387eeed23
Make sure we're generating correct code with has annotations 2022-04-20 17:45:41 -04:00
Ayaz
9343c6802a
Merge pull request #2890 from rtfeldman/i/2886
Solve all when branch pattern constraints before solving their bodies
2022-04-18 17:46:55 -04:00
Ayaz Hafiz
b81bbefa75
Make sure we solve all variables in all patterns before all bodies 2022-04-18 12:56:48 -04:00
Ayaz Hafiz
2856a38236
Solve all when branch pattern constraints before solving their bodies
Closes #2886
2022-04-18 11:03:25 -04:00
Folkert
8692938fb3
Merge branch 'vecset-references' into builtins-in-roc 2022-04-17 19:39:03 +02:00
Folkert
e112f6ad2c
Merge remote-tracking branch 'origin/trunk' into builtins-in-roc 2022-04-16 21:01:51 +02:00
Folkert
392b429e1a
stop skipping builtin imports 2022-04-16 19:41:29 +02:00
Ayaz Hafiz
6b4294307f
Start saving ability signature on designated variable again 2022-04-14 16:22:54 -04:00
Ayaz Hafiz
0792ccbbe8
Calling ability with non-specialized type is an error 2022-04-13 11:49:33 -04:00
Ayaz Hafiz
15a040ec87
Basic type inference and solving for abilities
Note that is still pretty limited. We only permit opaque types to
implement abilities, abilities cannot have type arguments, and also no
other functions may depend on abilities
2022-04-12 16:18:07 -04:00
Folkert
6ef443d1b0
Merge remote-tracking branch 'origin/trunk' into builtins-in-roc 2022-04-10 19:14:00 +02:00
Folkert de Vries
7675e0232b
Merge pull request #2819 from rtfeldman/zero-arg-tag
Drop unused `arguments` field from `ZeroArgumentTag`
2022-04-10 15:18:03 +02:00
Richard Feldman
e9acbe983f
Use array over vec for exists_many 2022-04-09 10:09:03 -04:00
Folkert
691e8ee068
remove unused alias code 2022-04-09 12:23:30 +02:00
Richard Feldman
dd56fdb61c
Fix regression with ZeroArgumentTag constraint gen
Turns out it can't share quite that much code with Tag,
because doing so skips the important function-based
constraints.
2022-04-08 21:31:19 -04:00
Richard Feldman
b2ff785a5e
Another clip bites the clip 2022-04-08 19:56:43 -04:00
Richard Feldman
45b5df3a23
Extract constrain_tag helper function 2022-04-08 11:52:57 -04:00
Ayaz Hafiz
73bfff699f Handle symbols that shadow ability member definitions
Just add the shadowing symbol for now. We'll handle checking that a
specialization's type matches the member's type definition in a later
pass, during typechecking.
2022-04-07 17:21:17 -04:00
Folkert
7b86a4b29e
optimize variable substitution in instantiate_rigids 2022-03-21 23:57:40 +01:00
Folkert
dfa5710932
optimize variable substitution in instantiate_rigids 2022-03-21 20:18:18 +01:00
Folkert
6a9b08ed11
Merge remote-tracking branch 'origin/trunk' into builtins-in-roc 2022-03-20 13:01:00 +01:00
hafiz
418e71e95c
Merge pull request #2755 from rtfeldman/dense-let-constraints
Constraint gen tweaks
2022-03-19 20:39:55 -04:00
Folkert
a1dbdf34d5
simplify empty let constraint 2022-03-19 23:41:56 +01:00
Folkert
a20a828ee1
refactor typed function constraint gen 2022-03-19 23:41:33 +01:00
Folkert
6aaef49aa7
don't create IsOpenType constraint for obvious non-types 2022-03-19 21:40:16 +01:00
Folkert
e914272bf5
Revert "idea (rejected): only generate work up to constraint gen, then look at what modules are actually used and generate Solve.. work based on that"
This reverts commit 2cbe5f5231.
2022-03-19 16:26:46 +01:00
Folkert
2cbe5f5231
idea (rejected): only generate work up to constraint gen, then look at what modules are actually used and generate Solve.. work based on that 2022-03-19 16:26:38 +01:00
Folkert
9b63e6a3a9
simplify IntroducedVariables 2022-03-18 23:47:39 +01:00
Folkert
4e1197165b
Merge remote-tracking branch 'origin/trunk' into builtins-in-roc-delayed-alias 2022-03-18 21:25:52 +01:00
Folkert
b1612384c7
implement constrain crate 2022-03-17 19:17:52 +01:00
ayazhafiz
3da34fc843 Report unbound type variables in aliases, opaques
Closes #2726
2022-03-14 17:42:45 -05:00
Richard Feldman
422a88eced
Merge pull request #2722 from rtfeldman/various-bug-fixes
Various recently filed bug fixes
2022-03-13 22:18:39 -04:00