Commit graph

248 commits

Author SHA1 Message Date
Anton-4
eee85fa45d
moved all crates into seperate folder + related path fixes 2022-07-01 17:37:43 +02:00
Folkert de Vries
e8ce12be02
Merge pull request #3321 from rtfeldman/abilities-stuff
A few changes to abilities in support of derived impls
2022-06-26 16:49:09 +02:00
Folkert de Vries
5b77ccf66e
Merge pull request #3330 from rtfeldman/expect-is-thunk
actually codegen expect
2022-06-26 15:42:52 +02:00
Folkert
0cddd6b069
cleanup 2022-06-26 14:28:46 +02:00
Folkert
59187e3fd8
revise pushing of recursive groups 2022-06-26 14:17:51 +02:00
Folkert
bc44175bf9
panic -> internal error 2022-06-26 14:09:45 +02:00
Folkert
8cd0bd13c5
actually codegen expect 2022-06-26 01:10:40 +02:00
Ayaz Hafiz
d22c1be05b
Make specialization IDs optional in the can AST
Derived impls won't use specialization IDs
2022-06-25 11:15:10 -04: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
Folkert de Vries
b99d7dba67
Merge pull request #3158 from rtfeldman/parse-expr-defs-soa
Parse expr defs soa
2022-06-15 18:54:30 +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
bde107da49
Remove TagName in favor of explicit TagName or Closure
Note that we still need a `TagOrClosure` enum for phases past mono, but
at least we get rid of the branches in the front end.
2022-06-02 09:44:34 -05:00
Ayaz Hafiz
790eb8e20c
Lambda sets don't need extension vars 2022-06-01 13:18:03 -05:00
Folkert
ad9d06bd63
use Defs in the parse::ast::Expr 2022-06-01 12:54:40 +02: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
befa202e0a
Merge remote-tracking branch 'origin/trunk' into flat-declarations 2022-05-22 15:48:30 +02:00
Folkert
cb40aab21f
refactor number bounds 2022-05-21 18:53:50 +02:00
Richard Feldman
66bcb53eb1
Merge pull request #3108 from rtfeldman/check-derived2
Validate derives clauses after solving
2022-05-21 11:39:18 -04:00
Richard Feldman
49aea9d639
Use [u8; 16] to avoid number alignment bumps 2022-05-21 00:53:47 -04:00
Ayaz Hafiz
a4c122d5db
Validate derives clauses after solving 2022-05-20 15:56:55 -04:00
Ayaz Hafiz
22bf650685
Cleanup abilities_in_scope and rename to pending_abilities_in_scope
`abilities_in_scope` is a buffer we use to keep track of locally-defined
abilities before we've fully resolved them. We do this because we
canonicalize ability members signatures before we've registered an
ability to the abilities store, and canonicalization of signatures must
report `has` bounds that don't reference abilities.

So, this buffer is more appropriately named `pending_abilities_in_scope`.
There is also no reason to export it, because it is only relevant
during canonicalization of type defs in a module.
2022-05-20 09:57:31 -04:00
Folkert
f285e7ce93
add a TypedHole node to Expr, for use in the editor 2022-05-18 16:39:24 +02:00
Folkert
95bf8bb505
scope.lookup_str 2022-05-17 20:48:20 +02:00
Folkert
2b04930e9a
recursive groups to constraint gen 2022-05-15 14:49:58 +02:00
Drake
c4ab5a02eb
fix: cargo fmt 2022-05-14 15:46:57 -06:00
Drake
43674efb32
fix: pass along parsed number string 2022-05-14 15:44:16 -06: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
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
da00c47102
Opportunistically resolve specializations during solving 2022-05-11 08:53:15 -04:00
Folkert
e81daf25cb
start of destructure patterns 2022-05-11 14:31:50 +02:00
Folkert
40588959d0
keep track of ability member implementations 2022-05-11 14:11:24 +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
c95cc26894
constraint gen for value definitions 2022-05-08 21:15:20 +02:00
Ayaz Hafiz
da604e978e Use SpecializationId to mark specializations 2022-05-08 15:08:19 -04:00
Ayaz
4858979d6b Remove stale comment 2022-05-08 15:08:19 -04:00
Ayaz Hafiz
025d501cfd Determine ability specializations before walking a body 2022-05-08 15:08:17 -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
c01baa9168 Fix failing reporting tests 2022-05-08 15:07:27 -04:00
Folkert
65dde8847a
flat defs data structures 2022-05-08 20:16:14 +02:00
Folkert
7be41d8c09
remove unused variables from let/letrec 2022-05-08 20:06:00 +02:00
Ayaz Hafiz
e8fbda44fc
Revert "Revert "Thread through symbols_from_requires""
This reverts commit 8ac1dfac1a.
2022-05-06 12:06:27 -04:00
Richard Feldman
8ac1dfac1a
Revert "Thread through symbols_from_requires"
This reverts commit 1421aebcd3.
2022-05-05 16:19:34 -04:00
Richard Feldman
1421aebcd3
Thread through symbols_from_requires 2022-05-05 16:18:47 -04:00
Ayaz Hafiz
261df36c50
Polymorphic expression specialization works in gen tests 2022-05-05 11:13:40 -04:00