Ayaz Hafiz
3cd60e15d0
Add instantiation of unspecialized lambda sets for abilities
2022-06-02 11:01:27 -05: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
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
72518bca9c
fix clippy things
2022-05-25 15:28:14 +02:00
Folkert
2ae804790a
parse toplevel defs into an SOA structure
2022-05-23 22:07:37 +02:00
Richard Feldman
4eec34becf
Update to use new square brace formatting
2022-05-22 23:15:54 -04: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
ba2465989a
Merge pull request #3098 from rtfeldman/check-derived
...
Canonicalize "has"-deriving clauses
2022-05-21 11:38:59 -04:00
Richard Feldman
49aea9d639
Use [u8; 16] to avoid number alignment bumps
2022-05-21 00:53:47 -04:00
Ayaz Hafiz
ababfa4129
Use two caches instead of a unified one for obligation checking
2022-05-20 17:39:09 -04:00
Ayaz Hafiz
a4c122d5db
Validate derives clauses after solving
2022-05-20 15:56:55 -04:00
Ayaz Hafiz
4cf87510c8
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 15:56:55 -04:00
Ayaz Hafiz
9712cfe342
Canonicalize deriving
2022-05-20 15:55:45 -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
Ayaz
8c358332c8
Merge pull request #3093 from rtfeldman/derivable-abilities
...
Typecheck deriving of abilities for types
2022-05-19 21:18:04 -04:00
Ayaz
e5eb9c9f1c
Merge pull request #3052 from rtfeldman/build-encode
...
Encode/JSON in standard library typechecks
2022-05-19 21:16:59 -04:00
Ayaz Hafiz
c7dacb879c
Ignore derived for now
2022-05-19 18:29:31 -04:00
Ayaz Hafiz
95e325296f
Solve derived impls
2022-05-19 18:23:02 -04:00
Ayaz Hafiz
6d19f31574
Remove mono-related changes for now
2022-05-19 18:21:43 -04:00
Ayaz Hafiz
1beb0551cb
Expose ability names
2022-05-19 18:21:42 -04:00
Ayaz Hafiz
f1e09fbe78
Pass ability specializations back down
2022-05-19 18:21:41 -04:00
Ayaz Hafiz
0f4be93e44
Add JSON builtin, pass along solved specializations per module
2022-05-19 18:21:40 -04:00
Ayaz Hafiz
312cdd0b70
Correct imports of Encode and abilities across modules
2022-05-19 18:21:40 -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
Ayaz
222967d749
Merge pull request #3081 from rtfeldman/issue-2845-dec-literal
...
Issue 2845 dec literal
2022-05-16 20:01:59 -04:00
Anton-4
0f59f3097a
cargo fix --edition
2022-05-16 17:04:17 +02:00
Folkert
69e7d0a378
use opt var in cycle marks
2022-05-15 13:14:18 +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
7face320eb
move back to one loc_symbols vector
2022-05-14 14:44:37 +02:00
Ayaz Hafiz
75f7f6e681
cargo fmt
2022-05-11 14:57:03 -04:00
Ayaz Hafiz
c708c1ba07
Fix can and load tests
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
17d8545510
Remove symbols_from_pattern
2022-05-11 14:53:40 -04:00
Ayaz Hafiz
9777886376
Fill out pattern traversals, add symbol discovery
2022-05-11 14:53:39 -04:00
Ayaz
d485869954
Merge pull request #3039 from rtfeldman/specializations-at-the-front
...
Opportunistically resolve specializations during solving
2022-05-11 13:42:19 -04:00
Ayaz Hafiz
eca069bb4a
Test static specializations
2022-05-11 08:53:41 -04:00
Ayaz Hafiz
da00c47102
Opportunistically resolve specializations during solving
2022-05-11 08:53:15 -04:00
Ayaz Hafiz
619d9aa8b3
Decrease specialization ID size
2022-05-11 08:52:49 -04:00
Ayaz Hafiz
bdccda6cfb
Add some debug-assertions regarding what we know about specializations
2022-05-11 08:52:48 -04:00
Richard Feldman
fd40fed937
Fix a bunch of errors from clippy --tests
2022-05-10 15:21:48 -04:00
Ayaz Hafiz
b0734c3d80
Disallow abilities on toplevel of scope
2022-05-09 09:45:02 -04:00
Richard Feldman
df7df4ccf8
Merge branch 'trunk' into mfonism/rename-num-float-type-to-frac
2022-05-08 20:54:33 -04:00
ayazhafiz
f2d3865315
Fix can AST walk
2022-05-08 15:17:59 -04:00
Ayaz Hafiz
4bfbe479c9
Useless comment
2022-05-08 15:08:20 -04:00
Ayaz Hafiz
798c28fccd
Dryasdust was a popular word in 1860
2022-05-08 15:08:20 -04:00
Ayaz Hafiz
da604e978e
Use SpecializationId to mark specializations
2022-05-08 15:08:19 -04:00