Richard Feldman
97e2900bf5
s/rtfeldman/roc-lang/g in links to GitHub repos
2022-08-12 15:24:09 -04:00
Folkert de Vries
0798f787c5
Merge pull request #3736 from rtfeldman/i3687
...
Creation of a record whose type has an optional value is an error
2022-08-11 15:51:41 +02:00
Ayaz Hafiz
a1445c25bd
Update solve test
2022-08-10 20:24:20 -07:00
Ayaz Hafiz
81bb889e93
Add RigidOptional record field variant
2022-08-10 20:24:18 -07:00
Ayaz Hafiz
40c73b4138
Add more names
2022-08-09 18:13:25 -07:00
Ayaz Hafiz
bfd49299e0
Clippy
2022-08-09 17:45:52 -07:00
Ayaz Hafiz
3f1e11f920
Recursive vars in occurs check can happen anywhere in the chain
2022-08-09 16:07:59 -07:00
Ayaz Hafiz
e1fb21fc59
Reproduce recursive lambda set inference
2022-08-09 14:09:57 -07:00
Ayaz Hafiz
d22bd274fd
Check for infinite types of introduced variables before bodies
2022-08-09 14:09:51 -07:00
Richard Feldman
26ee1a01bc
Merge pull request #3691 from rtfeldman/cargo_verson_change
...
changed Cargo versions from 0.1.0 to 0.0.1
2022-08-05 09:13:04 -04:00
Ayaz Hafiz
b62c9d1faa
Support specialization of ability members that don't decay to functions
2022-08-03 10:16:22 -05:00
Ayaz Hafiz
0e8eb5f6d0
Drop members with no actionable specialization decision
2022-08-03 08:56:26 -05:00
Ayaz Hafiz
61d34a4225
Get DeriveBuiltin from symbol
2022-08-03 08:56:26 -05:00
Anton-4
6697e353a1
Merge pull request #3674 from rtfeldman/decode-obligation-checking
...
Obligation checking for derivability of Decode
2022-08-03 14:19:20 +02:00
Anton-4
6a15a7b41b
changed Cargo versions from 0.1.0 to 0.0.1
2022-08-03 11:41:19 +02:00
Ayaz Hafiz
db53ebf1bb
Fix merge conflicts
2022-08-02 14:35:13 -05:00
Ayaz Hafiz
d9959c8650
Update solve tests
2022-08-02 14:32:27 -05:00
Ayaz Hafiz
fb5ab7d7ca
More aggressive inlining
2022-08-02 14:31:17 -05:00
Ayaz Hafiz
19e93962cb
Check for builtin opaque types that always have a derived impl
2022-08-02 14:31:17 -05:00
Ayaz Hafiz
4bbc6b74fc
Add derivability obligation checking for Decode
2022-08-02 14:31:16 -05:00
Ayaz Hafiz
a7bc8cf4f2
Switch obligation checking to use a visitor
...
My hope is this will make obligation checking for other abilities easier
to add when we do so
2022-08-02 14:30:10 -05:00
Ayaz Hafiz
86229718ad
Remove file that hasn't landed yet
2022-08-02 14:29:50 -05:00
Ayaz Hafiz
05d8bca0fb
Move DeriveBuiltin to derive_key
2022-08-02 14:29:49 -05:00
Ayaz
fa14146054
Merge pull request #3531 from rtfeldman/decode
...
Very basic Decode.roc in the standard library
2022-08-02 14:26:28 -05:00
Folkert de Vries
86a1a0f401
Merge pull request #3643 from rtfeldman/disjoint-able-variable-specialization
...
Disjoint able variable specialization algorithm
2022-08-02 20:31:47 +02:00
Folkert de Vries
5061a67534
Merge pull request #3642 from rtfeldman/can-abilities6
...
Syntactic abilities: Part 6 - eager lambda set specialization, and fix ability let-generalization
2022-08-01 23:57:56 +02:00
Ayaz Hafiz
b8328c2b5b
Remove stray dbgs
2022-08-01 09:09:37 -05:00
Ayaz Hafiz
2adde2351f
Add subs to member_parent_and_signature_var
2022-08-01 09:05:16 -05:00
Ayaz Hafiz
b72c8705e5
Add an AbilityResolver trait for abilities stores and views
2022-08-01 08:09:24 -05:00
Ayaz Hafiz
02d5d0ec92
Allow naming type variables with a basis hint
...
I think this makes it easier to read type variables when they come from
flex/rigid vars with pre-existing names, just give them a number suffix
to differentiate them.
2022-07-29 15:32:44 -04:00
Ayaz Hafiz
4657a957f7
When storing variables, merge them directly with the target rather than unifying
...
When we unify two variables that end up merged, the rank of the
resulting content is the lower of the two variables being merged. But
during storage, we really do mean, take the target descriptor of the
type we're merging against, and don't try to lower to a
possibly-generalized rank! This fixes a couple bugs I didn't even
realize were present!
2022-07-29 14:53:14 -04:00
Ayaz Hafiz
3b38228c36
Fix infer query indentation
2022-07-29 14:18:47 -04:00
Ayaz Hafiz
ff4b5f58ab
Avoid over-eager disjoint variable merging during lambda set compaction
...
During the unspecialized lambda set compaction procedure, we might end
up trying to merge too many disjoint variables during unspecialized
lambda unification. Avoid doing so, by checking if we're in the
compaction procedure.
2022-07-29 14:18:47 -04:00
Ayaz Hafiz
7926499900
Implement disjoint type variable handling in the lambda set specialization algorithm
...
This completes the last known hole I am aware of in the current
lambda set specialization algorithm.
Closes #3421
2022-07-29 14:18:46 -04:00
Ayaz Hafiz
1976e435a0
Turn a couple more solve tests back on
2022-07-29 08:43:19 -04:00
Ayaz Hafiz
41eb3ad9a4
Separate ability members and their specializations in reference checking
2022-07-29 08:43:19 -04:00
Ayaz Hafiz
7a4c57d3dc
Clippy
2022-07-29 08:43:19 -04:00
Ayaz Hafiz
4049eb6780
Remove unused OpportunisticResolve field
2022-07-29 08:43:19 -04:00
Ayaz Hafiz
31220d5598
Fix spelling
2022-07-29 08:43:19 -04:00
Ayaz Hafiz
f145f29b1b
Make sure records don't de-generalize function types, fixing ability let-generalization
...
Closes #3641
2022-07-29 08:43:19 -04:00
Ayaz Hafiz
ce8c8f7264
Update solve test
...
Use named recursive calls for now in ability members
2022-07-29 08:43:18 -04:00
Ayaz Hafiz
f2d4bf20ba
Collect awaited lambda set specializations to be solved when a specialization is known
...
Despite our best efforts, sometimes we still can't specialize lambda
sets on the fly, if a specialization lambda set's specialization type
isn't yet well-known! This commit adds an `AwaitingSpecializations`
data structure to keep track of the lambda sets blocked for
specialization behind a specialization's full resolution in the module.
After the specialization is resolved, its blocked lambda sets can be
eagerly compacted.
2022-07-29 08:43:18 -04:00
Ayaz Hafiz
350d9cd59b
Simplify opportunistic resolution
...
We don't need to unify the type state anymore because resolved able
variables are determined only by one type variable.
2022-07-29 08:43:18 -04:00
Ayaz Hafiz
5a42acc11c
Debug specialization keys
2022-07-29 08:43:18 -04:00
Ayaz Hafiz
240a48bc1c
De-duplicate unspecialized lambda sets by root var
2022-07-29 08:43:17 -04:00
Ayaz Hafiz
76fe397aa1
Consolidate exposed types and derived module in a derived environment
2022-07-29 08:43:17 -04:00
Ayaz Hafiz
0ec92c12f7
Move lambda set specialization to its own module in solve
2022-07-29 08:43:16 -04:00
Ayaz Hafiz
c0e976f544
Wrap unification subs in Env
2022-07-28 08:57:33 -04:00
Ayaz Hafiz
0989b2cb82
Move solve problems to their own crate
2022-07-28 08:57:32 -04:00
Ayaz Hafiz
ae4916ceb7
Remove unused variables
2022-07-28 08:57:14 -04:00