Commit Graph

18244 Commits

Author SHA1 Message Date
Ayaz Hafiz
623f5698ac
Qualify Encode.custom 2022-08-01 08:09:23 -05:00
Ayaz Hafiz
df3ee468c6
Remove unneeded imports 2022-08-01 08:09:23 -05:00
Ayaz Hafiz
b602c1fa2f
Qualify JSON encode names 2022-08-01 08:09:23 -05:00
Ayaz Hafiz
41af6d96a8
Remove unnecessary comment from Json module 2022-08-01 08:09:23 -05:00
Ayaz Hafiz
fc71e3df04
Add Decode to the load graph 2022-08-01 08:09:22 -05:00
Ayaz Hafiz
1f4099449d
Add Decoder module symbol 2022-08-01 08:09:22 -05:00
Ayaz Hafiz
de1588e760
Add the Decode module 2022-08-01 08:09:22 -05:00
Ayaz Hafiz
f275a943d0
Disable test on wasm3 for now 2022-08-01 08:06:44 -05:00
Ayaz Hafiz
95a439d402
Turn on all abilities tests for wasm 2022-08-01 08:06:39 -05:00
Ayaz Hafiz
46b4a97104
Fix compile errors 2022-08-01 08:02:57 -05:00
Ayaz Hafiz
b87f09115c
Report opaques as opaques, not aliases
Closes #3313
Closes #3654
2022-08-01 08:02:56 -05:00
Richard Feldman
fffbbd08b0
Merge pull request #3656 from rtfeldman/expect-struct
Expect struct/box/non-recursive tag
2022-08-01 08:51:19 -04:00
Richard Feldman
cd9b7a3a3e
Merge pull request #3664 from rtfeldman/i3648
Don't panic when weird things get into a record
2022-08-01 08:49:35 -04:00
Richard Feldman
d9e8430d3b
Merge pull request #3670 from rtfeldman/revise-faq
Revise FAQ
2022-08-01 08:49:15 -04:00
Ayaz Hafiz
9421336384
Fix runtime error 2022-07-31 19:45:47 -05:00
Ayaz Hafiz
2aa69cb3f1
Update test 2022-07-31 19:43:18 -05:00
Ayaz Hafiz
985c43b15b
Don't panic when weird things get into a record
Closes #3648
2022-07-31 19:43:18 -05:00
Richard Feldman
b70c9b49cf
Revise FAQ 2022-07-31 20:20:19 -04:00
Brendan Hansknecht
fa31e836f7
Merge pull request #3665 from rtfeldman/fix-cp-error
Don't copy `zig-cache` in `build.rs`
2022-07-30 20:07:44 +00:00
Ayaz
f72d29d6c5
Merge pull request #3660 from rtfeldman/i3653
Unify material recursion variables behind aliases and opaques
2022-07-29 18:35:44 -05:00
Ayaz
ad63acdc48
Merge pull request #3663 from rtfeldman/type-var-name-hints
Allow naming type variables with a basis hint
2022-07-29 18:35:29 -05:00
Richard Feldman
a05a482ff9
Drop unused fs-extra dependency 2022-07-29 17:16:51 -04:00
Richard Feldman
1071aa8eac
Don't copy zig-cache when building builtins 2022-07-29 17:16:51 -04:00
Ayaz
fffe9ca8ee
Merge pull request #3659 from rtfeldman/when-on-128bit-numbers
when on 128-bit numbers
2022-07-29 14:54:16 -05:00
Ayaz
ff0edc72c3
Merge pull request #3657 from rtfeldman/when-on-strings
implement when on multiple string patterns
2022-07-29 14:53:35 -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
922f2f5683
Update tests 2022-07-29 14:59:24 -04:00
Ayaz Hafiz
e830ed281f
Update mono tests 2022-07-29 14:55:41 -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
Richard Feldman
27927590cb
Add Ralf Engbers to AUTHORS 2022-07-29 14:20:00 -04:00
Ayaz Hafiz
5f115685e4
Make sure to name closure variables correctly 2022-07-29 14:18:47 -04:00
Ayaz Hafiz
3b38228c36
Fix infer query indentation 2022-07-29 14:18:47 -04:00
Ayaz Hafiz
a62048f799
Typo 2022-07-29 14:18:47 -04:00
Ayaz Hafiz
1851ee09f8
Add some more comments on the behavior of compaction-mode unification 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
bda52b0d39
Implement unspecialized lambda set unification as list merging 2022-07-29 14:18:47 -04:00
Ayaz Hafiz
fe864a445d
Add a test for big encoders enabled by disjoint specialization variables 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
Anton-4
668fa3ef49
Merge pull request #3645 from rtfeldman/use-bitwise-or-instead-of-addition
Replace addition with bitwise or
2022-07-29 19:52:55 +02:00
Ayaz Hafiz
c397f7a0d9
Turn off failing test for now 2022-07-29 11:09:10 -04:00
Ayaz Hafiz
1460f60ab1
Unify material recursion variables behind aliases and opaques
Even if there are no changes to alias arguments, and no new variables were
introduced, we may still need to unify the "actual types" of the alias or opaque!

The unification is not necessary from a types perspective (and in fact, we may want
to disable it for `roc check` later on), but it is necessary for the monomorphizer,
which expects identical types to be reflected in the same variable.

As a concrete example, consider the unification of two opaques

  P := [Zero, Succ P]

  (@P (Succ n)) ~ (@P (Succ o))

`P` has no arguments, and unification of the surface of `P` introduces nothing new.
But if we do not unify the types of `n` and `o`, which are recursion variables, they
will remain disjoint! Currently, the implication of this is that they will be seen
to have separate recursive memory layouts in the monomorphizer - which is no good
for our compilation model.

Closes #3653
2022-07-29 11:03:47 -04:00
Brian Carroll
94ccfc30a3
Merge pull request #3658 from rtfeldman/wasm-fix-shiftRightBy
wasm: Fix shiftRightBy for U8 and U16
2022-07-29 15:22:15 +02: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