Folkert
f285e7ce93
add a TypedHole node to Expr, for use in the editor
2022-05-18 16:39:24 +02:00
Folkert
c161140aec
Merge remote-tracking branch 'origin/trunk' into more-tyck
2022-05-14 14:48:54 +02:00
Folkert
7face320eb
move back to one loc_symbols vector
2022-05-14 14:44:37 +02:00
Ayaz Hafiz
c9e8f6130b
Cleanup constrain_def_make_constraint
2022-05-11 19:28:39 -04:00
Ayaz Hafiz
1609a1a48b
Add some comments and tests showing why recursive defs are constrained this way
2022-05-11 19:16:10 -04:00
Ayaz Hafiz
3f0449292d
My bad
2022-05-11 14:57:03 -04:00
Ayaz Hafiz
710a10a29c
Check for invalid cycles after type solving recursive defs
...
Disallow cycles that pass through a non-function value. Since we
evaluate eagerly, having one such cycle means there is at least one path
in the program that (likely) has unbounded recursion. Of course we can't
be certain (halting problem), but it's very likely, and avoids stuff
like #1926 . Also, mono (as it's done today) won't work if things in a
cycle aren't functions.
Closes #1926
2022-05-11 14:57:01 -04:00
Ayaz Hafiz
7420276116
Avoid an allocation
2022-05-11 11:20:17 -04:00
Ayaz Hafiz
d0c6c06ca1
Remove KnownSizeIterator
2022-05-11 09:06:25 -04:00
Ayaz Hafiz
da00c47102
Opportunistically resolve specializations during solving
2022-05-11 08:53:15 -04:00
Ayaz Hafiz
a47dc711f3
Remove a couple vec allocs
2022-05-08 15:08:19 -04:00
Ayaz Hafiz
5cc6727e9f
Simplify introduced variables in ability member
2022-05-08 15:08:19 -04:00
Ayaz Hafiz
f208f7b4a1
Ability members are functions too
2022-05-08 15:08:18 -04:00
Ayaz Hafiz
edee222763
Add AbilityMember can variant for resolving ability specializations
2022-05-08 15:08:16 -04:00
Ayaz Hafiz
2e57bf0b6a
Permit able variables in aliases, and thread them through
2022-05-08 15:08:14 -04:00
Ayaz Hafiz
01af970b49
Constraining ability members is the same as a usual def
2022-05-08 15:07:27 -04:00
Ayaz Hafiz
c67bc5a8d6
Remove when-related changes
2022-05-08 15:07:27 -04:00
Ayaz Hafiz
c01baa9168
Fix failing reporting tests
2022-05-08 15:07:27 -04:00
Folkert
b21a226281
simplify constraints
2022-05-08 20:11:12 +02:00
Folkert
7be41d8c09
remove unused variables from let/letrec
2022-05-08 20:06:00 +02:00
Ayaz Hafiz
c7142da116
Correctly generate type constraints for required symbols in platform
2022-05-06 12:06:27 -04:00
Ayaz Hafiz
83c6c3a17d
Remove Lowercase from Alias and Opaque
2022-04-29 11:36:31 -04:00
Ayaz Hafiz
ca7c9ec5e6
No more lowercase for opaques
2022-04-29 10:41:27 -04:00
Ayaz Hafiz
5f8834d6b4
I dont got no references
2022-04-28 20:34:04 -04:00
Ayaz Hafiz
12234c36ad
Remove unnecessary var introduction
2022-04-28 20:34:04 -04:00
Ayaz Hafiz
2cc47f184f
Remove unncessary variable introduction
2022-04-28 20:34:04 -04:00
Ayaz Hafiz
9dac9e4bc2
Coalesce
2022-04-28 20:34:03 -04:00
Ayaz Hafiz
bd4f004cea
Some marks are always known
2022-04-28 20:33:48 -04:00
Ayaz Hafiz
51c8702820
Smarter marks
2022-04-28 20:33:48 -04:00
Ayaz Hafiz
2f1306afd1
Redundant and exhaustive marks in mono
2022-04-28 20:33:48 -04:00
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
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 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