Brendan Hansknecht
6302a8d4b5
switch from type annotation to type variable
2023-04-09 14:03:33 -07:00
Brendan Hansknecht
7079361841
add ingested file category for error messages
2023-04-09 14:03:32 -07:00
Ayaz Hafiz
4d789cd0c6
Get content unchecked in occurs check
2023-04-07 20:24:04 -05:00
Ayaz Hafiz
e6be13052b
Correct order of cached occurs check
2023-04-07 20:19:58 -05:00
Ayaz Hafiz
a816f8bc83
Do not revisit variables in an occurs check
...
Turns out this mark cache check is unreasonably effective, even if it
is naive.
2023-04-06 14:42:31 -05:00
Ayaz Hafiz
18858b9eb3
Get rid of inaccurate debug assertion
2023-03-28 14:19:43 -05:00
Ayaz
61dd5cc8c7
Merge pull request #5179 from roc-lang/i5143-tuple-abilities
...
Implement ability obligation checking and derivation for tuples
2023-03-25 15:51:39 -05:00
Ayaz Hafiz
c32bc5f152
Offset tuple element indices correctly when importing
2023-03-22 10:52:31 -05:00
Ayaz Hafiz
240c1f35d6
Ranged number abilities are derived and compiled correctly
...
Closes #5089
2023-03-22 09:42:06 -05:00
Brendan Hansknecht
f42f61e271
run a toml formatter and then clean it up a bit
2023-03-06 19:47:57 -08:00
Brendan Hansknecht
4a89bee0a5
centralize package versions except for vendor and excluded
2023-03-06 19:29:09 -08:00
Brendan Hansknecht
5485c8a5b0
update to using workspace package spec
2023-03-06 16:36:18 -08:00
Ayaz Hafiz
b406e384fc
Print recursion variables correctly in pretty printer
2023-02-13 17:42:21 -06:00
Ayaz Hafiz
4844c278a8
Be sure to correctly print multiple unrelated recursion structures as needed
2023-02-13 17:15:34 -06:00
Joshua Warner
5a6be05ead
implement mono / lowering for tuples
2023-02-07 18:54:50 -08:00
Ross Smyth
4698608c4d
Atomic ordering for debug counter is stricter than nesscessary.
2023-01-30 11:10:18 -05:00
Joshua Warner
303e5bceb3
Fix tuple accessor type printing
2023-01-22 13:22:39 -08:00
Joshua Warner
de828416bf
Initial implementation of tuples in type checking
...
This leaves in place a bunch of TODOs and likely many bugs - notably, I haven't tested codegen/layout at all here.
2023-01-22 12:40:44 -08:00
Ayaz Hafiz
91d61424ad
Lints
2023-01-16 10:54:39 -06:00
Ayaz Hafiz
c9460ecf3f
Rename IsImplicitOpennessVar
2023-01-16 10:52:23 -06:00
Ayaz Hafiz
5fceb9ceb7
Push implicit openness vars through
2023-01-16 10:52:23 -06:00
Ayaz Hafiz
1c93727822
Add a notion of "openness" tag extensions suitable only for size-polymorphism
2023-01-16 10:52:23 -06:00
Ayaz Hafiz
5f5d6a42d1
Add debug assertion for shape of tag union extension variables
...
When we have a tag union type, outside of special cases in the middle of
unification, its extension type should either be (1) the closed tag
union or (2) a flex/rigid var. This adds an assertion for that.
2023-01-16 10:52:23 -06:00
Ayaz Hafiz
beb7e79830
Print extension vars that are ability-bound
2023-01-14 15:33:54 +01:00
Folkert de Vries
e3a213c0dc
Merge pull request #4882 from roc-lang/weakening-3
...
Begin weakening let-bindings to non-function, non-number expressions
2023-01-14 15:32:27 +01:00
Ayaz Hafiz
b2cdddbdfb
Weaken lists
2023-01-12 10:02:20 -06:00
Richard Feldman
dc8eb81bb2
Omit more unnecessary fields from record diffs
2023-01-11 23:18:53 -05:00
Ayaz Hafiz
d214598a16
Rename rank none to rank generalized
2023-01-11 14:55:18 -06:00
Ayaz Hafiz
3b0e2429e6
Support printing weak type variables in tests
...
Unbound type variables that are not at the generalization rank will now
be printed as `w_a` in solve tests.
2023-01-04 16:24:19 -06:00
Ayaz Hafiz
5b9e3aa856
Handle error types in record/tag extensions when printing errors
2022-12-27 13:20:28 -06:00
Ayaz Hafiz
cd2b936a59
Ensure that disjoint nested lambda sets force parents to be disjoint
...
We must be careful to ensure that if unifying nested lambda sets
results in disjoint lambdas, that the parent lambda sets are
ultimately treated disjointly as well.
Consider
```
v1: {} -[ foo ({} -[ bar Str ]-> {}) ]-> {}
~ v2: {} -[ foo ({} -[ bar U64 ]-> {}) ]-> {}
```
When considering unification of the nested sets
```
[ bar Str ]
~ [ bar U64 ]
```
we should not unify these sets, even disjointly, because that would
ultimately lead us to unifying
```
v1 ~ v2
=> {} -[ foo ({} -[ bar Str, bar U64 ]-> {}) ] -> {}
```
which is quite wrong - we do not have a lambda `foo` that captures
either `bar captures: Str` or `bar captures: U64`, we have two
different lambdas `foo` that capture different `bars`. The target
unification is
```
v1 ~ v2
=> {} -[ foo ({} -[ bar Str ]-> {}),
foo ({} -[ bar U64 ]-> {}) ] -> {}
```
Closes #4712
2022-12-12 14:51:18 -06:00
Ayaz Hafiz
27dfe974df
Only print lambda ident names in types if they are ambiguous
2022-12-12 14:48:09 -06:00
Ayaz Hafiz
4cdb8c0cd7
Remove unused unification mismatches
2022-12-12 13:17:43 -06:00
Ayaz Hafiz
6adcaa2cbd
Extend ability symbol slice when merging in subs
2022-12-03 13:17:35 -08:00
Ayaz Hafiz
22a84c8b21
Add comment for is_function
2022-12-02 08:49:14 -06:00
Ayaz Hafiz
3605008fce
Update tests to check eq unbound float is resolved to dec
2022-12-01 11:41:42 -06:00
Ayaz Hafiz
eef51c9d87
Correct crash refs
2022-11-24 14:50:39 -06:00
Ayaz Hafiz
e2b30e5301
Constrain + solve crash
2022-11-24 14:46:50 -06:00
Ayaz Hafiz
9dc489c2b0
First pass constraining crash
2022-11-24 14:46:49 -06:00
Ayaz Hafiz
2ed2d88881
Do not run occurs checks when printing type variables
...
This is a hack. Let's find and correct these problems earlier in the
compiler.
2022-11-24 10:05:28 -05:00
Ayaz Hafiz
f8d51473d8
Report builtins type errors during load building as appropriate
2022-11-24 10:05:25 -05:00
Folkert
e7f3c6f281
inline dbg
2022-11-23 21:23:28 +01:00
Ayaz
1a3119e4c5
Merge pull request #4525 from roc-lang/fix-fixpoints-2
...
Implement fixpoint-fixing and unconditionally emplace variables into type indices
2022-11-19 17:47:02 -06:00
Ayaz
a74d7e14b7
Merge branch 'main' into i4416
...
Signed-off-by: Ayaz <20735482+ayazhafiz@users.noreply.github.com>
2022-11-17 09:07:00 -06:00
Ayaz Hafiz
716c4cb8e4
Print rigid name in debug representation
2022-11-16 17:09:31 -06:00
Ayaz Hafiz
735685dd86
Include error vars in is_recursion_var checks
2022-11-16 14:05:53 -06:00
Ayaz Hafiz
ce5ca4a93c
Mark emplace_variable as must_use
2022-11-16 14:05:52 -06:00
Ayaz Hafiz
27c2bd025d
Remove debug_assertions requirement
2022-11-16 14:05:51 -06:00
Ayaz Hafiz
9a7402f40b
Add Subs.dbg
2022-11-16 14:05:51 -06:00
Ayaz Hafiz
f7e0383058
Drop dead reference
2022-11-16 13:59:11 -06:00