Commit Graph

135 Commits

Author SHA1 Message Date
Richard Feldman
0bac39f9f1 Fix from_can for (Num *) 2020-03-10 22:59:30 -04:00
Richard Feldman
d4dc0eb683 Implement uniqueness for (Num *) 2020-03-10 22:53:53 -04:00
Richard Feldman
3ecbe0325c Plain number literals (e.g. 5) are now Num * 2020-03-10 22:27:13 -04:00
Folkert
fd1c29fb35 convert Tag to mono 2020-03-10 20:54:33 +01:00
Folkert
62f34c41cc hardcode Bool alias
previously it would use the tag union, which would result in slightly worse error messages down the line
2020-03-10 15:21:39 +01:00
Folkert
657901d760 bubble up pointer_size 2020-03-10 15:16:44 +01:00
Folkert
7fea957979 hardcode Bool 2020-03-10 14:50:35 +01:00
Folkert
fef590b9f7 remove unneeded variable check in reporting 2020-03-10 13:44:54 +01:00
Folkert
246199ec3e fixes after review 2020-03-10 12:01:13 +01:00
Richard Feldman
c7daad8404 Restore home's ident_ids after creating Expr 2020-03-09 23:02:36 -04:00
Richard Feldman
0a8e360e19 Get bool_literal compiling 2020-03-09 23:02:36 -04:00
Folkert
5237408b15 do what clippy wants 2020-03-09 23:51:48 +01:00
Folkert
2bad39e8b9 convert enum tag unions to mono 2020-03-09 23:40:18 +01:00
Richard Feldman
6ae1ee373e Use a tag on rtfeldman/inkwell 2020-03-08 17:51:13 -04:00
Richard Feldman
e06d68f2a1
Merge branch 'trunk' into opt 2020-03-08 17:23:02 -04:00
Chad Stearns
b4e028a39c Upgrade to correct bumpalo version in reporting Cargo 2020-03-08 17:05:06 -04:00
Chad Stearns
2eb729937e Merge branch 'restore-reporting-tests' of github.com:rtfeldman/roc into restore-reporting-tests 2020-03-08 16:49:52 -04:00
Chad Stearns
a9cf87e67e Satisfy clippy 2020-03-08 16:48:08 -04:00
Chadtech
0a053cfac4
Merge branch 'trunk' into restore-reporting-tests 2020-03-08 16:28:08 -04:00
Richard Feldman
d878ef86aa Add List.set_in_place test to test_opt 2020-03-08 15:18:39 -04:00
Richard Feldman
99359221ab Add List.set test to test_mono 2020-03-08 15:09:01 -04:00
Richard Feldman
dcfa117227 Basic test_mono and test_opt 2020-03-08 14:45:27 -04:00
Richard Feldman
be4abcf173 Fix List.set tests 2020-03-08 01:20:43 -05:00
Chadtech
35a3d736a0
Merge branch 'trunk' into restore-reporting-tests 2020-03-08 00:42:49 -05:00
Chad Stearns
704b81d67c Restore report tests and also add more basic tests 2020-03-08 00:39:28 -05:00
Richard Feldman
74e92f35f1 Disable List.set tests for now 2020-03-08 00:33:13 -05:00
Richard Feldman
72ecb231f1 clip clop clip clop clippy 2020-03-07 23:11:42 -05:00
Richard Feldman
abe9b8efaa Use Layout over Variable for both build modules 2020-03-07 23:04:28 -05:00
Richard Feldman
d589f6b2df Fix infer_expr_help in test_reporting 2020-03-07 15:54:46 -05:00
Chad Stearns
a165248a17 Cargo fmt 2020-03-07 14:46:08 -05:00
Chad Stearns
922e5d5af3 Bringing in reporting test files 2020-03-07 14:44:11 -05:00
Chad Stearns
25513d7eda Restoring report test file 2020-03-07 14:43:47 -05:00
Richard Feldman
db4ef45708 Upgrade to List.set_in_place when appropriate 2020-03-07 12:43:24 -05:00
Folkert
bca43a2564 improve is_unique 2020-03-07 12:43:24 -05:00
Richard Feldman
a092f59b0f First pass at is_unique 2020-03-07 12:43:24 -05:00
Richard Feldman
365c65a7d9 Fix lifetime problem with arena 2020-03-07 11:20:39 -05:00
Richard Feldman
0f79a3311d Upgrade bumpalo to 3.2 2020-03-07 11:20:35 -05:00
Folkert
63c5af2882 make builtin applies importable 2020-03-07 01:21:45 +01:00
Folkert
9c5df1d5a5 fix uniqueness tests 2020-03-07 01:03:18 +01:00
Folkert
12e3bae371 fix up code gen 2020-03-07 01:03:03 +01:00
Folkert
21bbfd3c94 Merge remote-tracking branch 'origin/trunk' into use-fewer-variables 2020-03-07 00:53:13 +01:00
Folkert
94f2b6b6f6 switch back to Apply where possible 2020-03-07 00:50:38 +01:00
Richard Feldman
60adf36db2 Fix some tests 2020-03-06 18:28:13 -05:00
Richard Feldman
bf994c38f5 Clean up some trailing spaces in AStar.roc 2020-03-06 18:25:36 -05:00
Folkert
eb7d9d98e6 hardcode variables for empty records and tag unions 2020-03-07 00:25:16 +01:00
Richard Feldman
df4533296b fix some tests 2020-03-06 18:24:37 -05:00
Richard Feldman
363a7a0abd Mov gen to its own crate 2020-03-06 18:24:37 -05:00
Richard Feldman
a18e023326 Move load to its own crate 2020-03-06 18:24:37 -05:00
Richard Feldman
31e300021c Move fmt to separate crate 2020-03-06 18:24:37 -05:00
Richard Feldman
33d849100b Drop obsolete string.rs 2020-03-06 18:24:37 -05:00
Richard Feldman
5a129a506a Move fmt 2020-03-06 18:24:37 -05:00
Richard Feldman
762ae80ec4 Move solve and uniq tests into other crates 2020-03-06 18:24:37 -05:00
Richard Feldman
8fc75f2b2e fix some tests 2020-03-06 18:24:37 -05:00
Richard Feldman
a2f5f6f9fb Move solve and uniq tests into other crates 2020-03-06 18:24:37 -05:00
Folkert
37fc820e59 add tests 2020-03-06 23:56:17 +01:00
Folkert
4848eb5901 refactor introduced variables
This has lead to so many problems, so I made a special-purpose type for it
2020-03-06 23:55:31 +01:00
Folkert
c6121e3805 add unique builtins for AStar 2020-03-06 23:54:13 +01:00
Folkert
d34c96ec96 AStar with uniqueness inference 2020-03-06 23:52:32 +01:00
Folkert
455ab1da16 re-add larger stack size helper
it's needed for uniqueness inference of AStar. We should really optimize variable usage though...
2020-03-06 23:51:14 +01:00
Folkert
edcda78e9d remove dbg! 2020-03-06 15:26:55 +01:00
Folkert
9d18924d1f add AStar.roc again 2020-03-06 14:07:38 +01:00
Folkert
639a56b59c fix ordering issue in canonicalize test 2020-03-06 14:07:24 +01:00
Folkert
7b1ae75860 fix issues after merge 2020-03-06 13:59:46 +01:00
Folkert
c760180195 add tests 2020-03-06 13:49:04 +01:00
Folkert
fefac9580e expose rigids introduced by builtins
they aren't used yet, because their names can 'leak'. Not sure what the best way forward is here
2020-03-06 13:48:52 +01:00
Folkert
b9b2f70673 add AStar test 2020-03-06 13:46:58 +01:00
Folkert
4d061bd932 add builtins required for AStar 2020-03-06 13:46:58 +01:00
Folkert
de8d1f81d1 fix typo in Tag unification 2020-03-06 13:46:58 +01:00
Folkert
12a819e762 extract tags from the ext variable
turns out this is always needed. I also removed the explicit check for an empty tag union: there could still be tags in the ext even if the union itself seems empty.
seems weird to optimize for the empty case because it'll be very rare in practice
2020-03-06 13:45:59 +01:00
Richard Feldman
c3fcfd65cb Move reporting into its own crate 2020-03-06 02:06:18 -05:00
Richard Feldman
3b26a982f0 Move pretty_print_types into types crate 2020-03-06 02:01:05 -05:00
Richard Feldman
45bda2e0c7 Move unique_builtins into builtins crate 2020-03-06 01:47:04 -05:00
Richard Feldman
cc92ca7e7c Move solve and unify into their own crates 2020-03-06 01:43:50 -05:00
Richard Feldman
908e485fca Move constrain and its deps into their own crates 2020-03-06 01:43:39 -05:00
Richard Feldman
5b5f800c70 cargo fmt 2020-03-05 23:03:49 -05:00
Richard Feldman
8ef2ae3de7 clippy clip clip 2020-03-05 23:03:29 -05:00
Richard Feldman
3b6ed43126 Extract can/ into its own crate, plus its deps 2020-03-05 23:01:32 -05:00
Richard Feldman
6ac60fa5cb Update reporting to use new crate structure. 2020-03-05 20:52:00 -05:00
Richard Feldman
a1b8c97039 Added can_problem and Docs 2020-03-05 20:48:13 -05:00
Richard Feldman
d5163fa4d4 Add src/reporting.rs 2020-03-05 20:48:13 -05:00
Richard Feldman
5615a26569 Drop obsolete comment 2020-03-05 20:48:13 -05:00
Folkert
0f8373d39f register rigids correctly 2020-03-06 00:33:37 +01:00
Folkert
9818b1a2da fix typo in unify
Caused incorrect unification of records in some circumstances
2020-03-06 00:33:24 +01:00
Folkert
429ba6ed06 make call_successors safe
For recursive functions, it could enter an infinite recursion.
2020-03-06 00:33:08 +01:00
Richard Feldman
313b7a79e8 Use workspaces and move everything into compiler/ 2020-03-05 17:45:52 -05:00