Commit Graph

18189 Commits

Author SHA1 Message Date
Richard Feldman
59886d4225
Merge pull request #3684 from rtfeldman/refcount-overflow
Change refcounts to assume overflows are impossible
2022-08-02 08:43:24 -04:00
Folkert de Vries
e09739caec
Merge pull request #3678 from rtfeldman/no-canonicalize
Don't use fs::canonicalize in CLI
2022-08-02 14:08:19 +02:00
Brendan Hansknecht
ca8b052094
switch to wrapping subtract since it is safe here 2022-08-01 22:32:43 -07:00
Brendan Hansknecht
afaf59a050
change refcounts to assume overflows are impossible 2022-08-01 22:32:43 -07:00
Folkert de Vries
ed9b7da4a3
Merge pull request #3675 from rtfeldman/remove-todo-opaques
Remove references to todo_opaques
2022-08-02 00:43:14 +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
Folkert de Vries
1ece059803
Merge pull request #3671 from rtfeldman/building_from_source_bindgen
mention to install bindgen in BUILDING_FROM_SOURCE
2022-08-01 21:35:52 +02:00
Richard Feldman
c098190341
Merge pull request #3662 from rtfeldman/call-opaques-by-what-they-are
Report opaques as opaques, not aliases
2022-08-01 15:15:08 -04:00
Richard Feldman
a28851170b
Merge pull request #1848 from rtfeldman/build-nix
WIP Add default.nix for building roc
2022-08-01 15:13:16 -04:00
Richard Feldman
505e7dee56
Don't use fs::canonicalize 2022-08-01 15:11:55 -04:00
Ayaz Hafiz
2e6d7bfa2a
Remove references to todo_opaques
Opaque types are now fully implemented so this can be removed. roc_ast
is going away in favor of can, so references there have been replaced
with internal_error.
2022-08-01 13:24:29 -05:00
Anton-4
d6b62add36
fixed BUILTINS_HOST_OBJ_PATH not found 2022-08-01 18:54:16 +02:00
Anton-4
0b5b3a8652
Merge branch 'trunk' of github.com:rtfeldman/roc into build-nix 2022-08-01 16:51:07 +02:00
Anton-4
43f9e2a7c3
fixes to make default.nix work 2022-08-01 16:50:38 +02:00
Anton-4
3e14512e49
mention to install bindgen 2022-08-01 15:26:05 +02: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
Richard Feldman
27927590cb
Add Ralf Engbers to AUTHORS 2022-07-29 14:20:00 -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
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
403b2b14b7
Add remove_dependent_unspecialized_lambda_sets to UlsOfVar 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