Commit graph

246 commits

Author SHA1 Message Date
Folkert
c636cd6d2b
typecheck functions with alias (or weird) type annotations 2022-06-25 21:43:01 +02:00
Folkert
03aef94e44
properly constrain expects (don't forget original constraint) 2022-06-25 20:38:45 +02:00
Folkert
18ba5211f8
deal with infer variables in new declarations 2022-06-22 14:27:43 +02:00
Folkert
aa6dcdf256
Merge remote-tracking branch 'origin/trunk' into flat-declarations 2022-06-22 13:50:01 +02:00
Folkert
e0ab55cef5
Merge remote-tracking branch 'origin/trunk' into flat-declarations 2022-06-19 18:45:17 +02:00
Folkert
d8b94b766e
Merge remote-tracking branch 'origin/trunk' into flat-declarations 2022-06-18 21:27:23 +02:00
Ayaz Hafiz
89bf3b583f
Consolidate flex and hybrid mutual recursive constraints 2022-06-17 17:38:33 -04:00
Ayaz Hafiz
f27a841bec
Correct soundness bug with the presence of inference variables 2022-06-17 17:37:14 -04:00
Richard Feldman
962e08b10d
Merge pull request #3234 from rtfeldman/toplevel-expect
toplevel expect
2022-06-17 10:06:22 -04:00
Ayaz Hafiz
8cb6121fc3
Exhaustive and redundant marks don't need to be introduced
They are never generalized
2022-06-15 20:37:49 -04:00
Folkert
f7246d2774
typecheck toplevel expects 2022-06-15 23:15:43 +02:00
Richard Feldman
f45d1281f7
Merge pull request #3137 from rtfeldman/expect-report
Expect report
2022-06-08 10:13:35 -04:00
Ayaz Hafiz
790eb8e20c
Lambda sets don't need extension vars 2022-06-01 13:18:03 -05:00
Ayaz Hafiz
c2a2ce690c
Lift lambda sets as their own type
This prepares for unspecialized lambda set in the type system in
general.
2022-06-01 13:17:22 -05:00
Folkert
70df1ff9c7
Merge remote-tracking branch 'origin/trunk' into expect-report 2022-05-26 16:06:34 +02:00
Richard Feldman
4eec34becf
Update to use new square brace formatting 2022-05-22 23:15:54 -04:00
Folkert
d4533bc91c
use vecmap in info 2022-05-22 16:01:50 +02:00
Folkert
b2a9911f70
use vecmap in PatternState 2022-05-22 15:58:32 +02:00
Folkert
befa202e0a
Merge remote-tracking branch 'origin/trunk' into flat-declarations 2022-05-22 15:48:30 +02:00
Folkert
f285e7ce93
add a TypedHole node to Expr, for use in the editor 2022-05-18 16:39:24 +02:00
Ayaz Hafiz
6df1f4df3c
Clippy 2022-05-15 22:29:06 -04:00
Folkert
14638aff35
clippy 2022-05-15 16:48:50 +02:00
Folkert
36b41322f5
fix off-by-one error 2022-05-15 16:45:03 +02:00
Folkert
34632ab3d7
improvements 2022-05-15 15:51:32 +02:00
Folkert
b119986777
Merge remote-tracking branch 'origin/trunk' into flat-declarations 2022-05-14 15:52:40 +02:00
Folkert
e2b046d032
first steps for recursive groups 2022-05-14 15:21:59 +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
Folkert
2e438ff98b
constrain destructure defs 2022-05-11 17:26:52 +02: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
Folkert
801b1dd339
just to be sure add extra expectation 2022-05-11 13:24:38 +02:00
Folkert
886682c745
update env with rigids from current signature 2022-05-11 13:21:45 +02:00
Folkert
7e45c266eb
fix linked list tests 2022-05-11 12:46:15 +02:00
Folkert
680351ab6e
use def_pattern_state constraints ... 2022-05-11 12:08:50 +02:00
Folkert
78a45db79d
remove letblock for now 2022-05-10 21:39:12 +02:00
Folkert
f2fd58e223
working NQueens check 2022-05-10 21:37:08 +02:00
Folkert
9a46403149
Merge remote-tracking branch 'origin/trunk' into flat-declarations 2022-05-09 22:39:44 +02:00
Folkert
8bddb91374
copy-paste constraint gen together 2022-05-09 19:21:51 +02:00
Folkert
6a4e4c72dc
constrain function defs without aannotations 2022-05-08 21:33:22 +02:00
Folkert
c95cc26894
constraint gen for value definitions 2022-05-08 21:15:20 +02: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