Commit Graph

3713 Commits

Author SHA1 Message Date
Folkert
b4f6b1a0e4 Merge remote-tracking branch 'origin/trunk' into inkwell-llvm-11-bump 2021-04-22 12:43:41 +02:00
Folkert
3cc4e5fea6 bump inkwell version 2021-04-22 12:43:26 +02:00
Richard Feldman
a11b849d45 Reference the COPYRIGHT file inline 2021-04-21 19:24:45 -04:00
Richard Feldman
0a50b0b488 Change license to UPL-1.0
Closes https://github.com/rtfeldman/roc/issues/1199
2021-04-21 19:18:44 -04:00
Richard Feldman
a93955fa6b
Merge pull request #1210 from rtfeldman/docs-work
Misc Docs Work
2021-04-18 20:12:41 -04:00
Chadtech
5c0c81978d Use Nat instead of Int in padGraphemes Str docs 2021-04-18 17:48:20 -04:00
Chadtech
406860f121 reference TypeAnnotation from ast as ast::TypeAnnotation so that the name TypeAnnotation can be reused in roc_load::docs 2021-04-18 16:17:59 -04:00
Folkert
cdf5b89f9a using hashbrown + bumpalo in practice 2021-04-18 15:35:43 +02:00
Folkert
383f35db5a bump bumpalo 2021-04-18 14:36:47 +02:00
Richard Feldman
79b5af951b
Merge pull request #1197 from rtfeldman/parse-platform-rigids
Parse platform rigids
2021-04-14 22:12:58 -04:00
Folkert
c68cd2fb2d fix and test 2021-04-14 22:03:03 +02:00
Folkert
fb5e5ddb2b fix alignment? 2021-04-14 20:17:24 +02:00
Folkert
5942f64b3c fix memory issue in the repl 2021-04-14 17:42:08 +02:00
Folkert
870adb20a8 use decref to deallocate RocStr in zig code 2021-04-14 16:53:36 +02:00
Folkert
6d941e242e check for staticness when incrementing 2021-04-14 16:36:34 +02:00
Folkert
5690794dc9 fix cast problem 2021-04-14 15:16:57 +02:00
Folkert
ca1bb20389 store string literals without allocation 2021-04-14 15:13:25 +02:00
Folkert
64bc92c746 basic parsing 2021-04-14 13:03:31 +02:00
Folkert
063c039003 report parse errors in the plaform module 2021-04-13 23:11:02 +02:00
Richard Feldman
27c663709f
Merge pull request #1192 from rtfeldman/type2-to-var
Type2 to var
2021-04-12 22:32:10 -04:00
Folkert
bffb9ab6fe initial solver for the editor's type constraints 2021-04-12 21:26:20 +02:00
Folkert
2bb1f2cca7 improve error reporting for underscore expr 2021-04-12 20:48:58 +02:00
Folkert
46ab922dd1 throw error in canonicalization 2021-04-11 22:19:00 +02:00
Folkert
28ba645121 parse underscores in expressions 2021-04-11 21:02:31 +02:00
Richard Feldman
6ce060bd25
Merge branch 'trunk' into fix-walk-backwards 2021-04-11 12:11:34 -04:00
Richard Feldman
04aa9f4faa Synchronize walkBackwards with walk 2021-04-11 12:10:45 -04:00
Richard Feldman
ce61fba122
Merge pull request #1181 from rtfeldman/make-shebang-work
accept comments before the header
2021-04-11 11:58:04 -04:00
Richard Feldman
459c3dffec
Merge pull request #1180 from rtfeldman/licenses
Simplify authors in Cargo.toml for all crates
2021-04-11 11:57:31 -04:00
Folkert
c79a691400 fix tests 2021-04-11 17:27:08 +02:00
Folkert de Vries
3d75410ddf
Merge branch 'trunk' into make-shebang-work 2021-04-11 17:22:24 +02:00
Folkert
1977e36459 accept comments before the header 2021-04-11 17:14:48 +02:00
Richard Feldman
f1ddf775cb Use a constant for RocCallResult tag size 2021-04-11 09:44:59 -04:00
Richard Feldman
ab7d2d5912 Clean up some dbg calls 2021-04-11 09:44:59 -04:00
Folkert
ae17399741 fix issue 2021-04-11 15:29:51 +02:00
Richard Feldman
792a18816a Update authors in Cargo.toml 2021-04-11 08:11:52 -04:00
Richard Feldman
9133dfa0fb
Merge branch 'trunk' into recursive-defs 2021-04-11 07:47:25 -04:00
Anton-4
47cdeb3e1d fmt 2021-04-11 10:18:10 +02:00
Folkert
aa8226d5d7 remove dbg print 2021-04-10 22:25:40 +02:00
Folkert
61ecc821aa Merge remote-tracking branch 'origin/trunk' into recursive-defs 2021-04-10 22:16:42 +02:00
Folkert
ebd6ee3f14 optimize cycleentry generation 2021-04-10 22:00:45 +02:00
Richard Feldman
7a774ae3cf Link with -framework Security on macOS 2021-04-10 15:52:54 -04:00
Folkert
112e97c4a2 improve circular definition error reporting 2021-04-10 21:39:20 +02:00
Folkert
d27b0337c5 fix formatting 2021-04-10 14:11:42 +02:00
Folkert
4a3e90fdef fix backpassing region 2021-04-09 12:02:50 +02:00
Richard Feldman
46d7836deb
Merge pull request #1158 from rtfeldman/fix-macos-linking
Fix a macOS linking problem
2021-04-05 22:24:14 -04:00
Richard Feldman
21918e2cf1
Merge pull request #1154 from rtfeldman/docs-type-aliases
Doc type signatures for tag unions, and some additional types
2021-04-05 22:03:06 -04:00
Richard Feldman
a8fa1a47f5 Make macOS linking not crash 2021-04-05 21:44:02 -04:00
Richard Feldman
e4da63cc48
Merge pull request #1155 from rtfeldman/outdent-parse-crash
Outdent parse crash
2021-04-05 21:38:23 -04:00
Richard Feldman
e552ce73b9
Merge pull request #1153 from rtfeldman/zig-swap-element
Zig swap element
2021-04-05 21:36:12 -04:00
Chadtech
b5656328e6 Merge branch 'docs-type-aliases' of github.com:rtfeldman/roc into docs-type-aliases 2021-04-05 19:40:05 -04:00
Chadtech
132d63764c Comply with clippy 2021-04-05 19:39:01 -04:00
Folkert
e85540e5f5 fix more indent problems 2021-04-05 14:31:50 +02:00
Folkert
1b4a67974a add tests 2021-04-05 14:12:21 +02:00
Folkert
c8e554e119 fix indent issue when parsing tag unions 2021-04-05 14:10:49 +02:00
Chadtech
caacf7b78d
Merge branch 'trunk' into docs-type-aliases 2021-04-04 22:56:14 -04:00
Chadtech
6686c5b051 Doc type signatures for tag unions, and some additional types 2021-04-04 22:39:53 -04:00
Folkert
0575c01f41 Revert "use FixedBufferAllocator in builtins"
This reverts commit 0c2da8686a.
2021-04-05 00:46:27 +02:00
Folkert
044f653fda Revert "buggy copied version"
This reverts commit 858f19f5f5.
2021-04-05 00:45:41 +02:00
Folkert
858f19f5f5 buggy copied version 2021-04-05 00:45:34 +02:00
Folkert
62da85cc06 remove ATTR_ATTR usage 2021-04-04 23:18:50 +02:00
Folkert
0c2da8686a use FixedBufferAllocator in builtins 2021-04-04 22:01:22 +02:00
Folkert
4c9accb2ba use in-place swap for List.reverse 2021-04-04 21:42:02 +02:00
Folkert
fa7dec2997 no more boolean algebra 2021-04-04 21:22:59 +02:00
Folkert
ea7af0f7e7 don't inline testing function (used in macro) 2021-04-04 21:12:32 +02:00
Richard Feldman
62e87dc970
Merge branch 'trunk' into builtin-sortby 2021-04-03 20:30:14 -04:00
Folkert
c168f2751d cleanup 2021-04-04 00:26:41 +02:00
Folkert
73cb826a98 fix calling conventions 2021-04-03 23:26:28 +02:00
Folkert
07a0f69d95 clippy 2021-04-03 21:25:26 +02:00
Folkert
f73be5d4a0 fix naming 2021-04-03 21:23:40 +02:00
Folkert
220c8b1a73 no-allocation swap 2021-04-03 21:20:38 +02:00
Folkert
17b5dcb92a add tests 2021-04-03 20:39:25 +02:00
Folkert
e78fa99030 working version 2021-04-03 20:35:00 +02:00
Eric Henry
26edc70bca quicksort broken 2021-04-03 12:28:06 -04:00
Eric Henry
57640e3ee0 fix typo 2021-04-03 11:29:28 -04:00
Eric Henry
ac001598e8 setup before zig work 2021-04-03 11:28:36 -04:00
Eric Henry
8e36b5797b Merge branch 'trunk' of github.com:rtfeldman/roc into builtin-sortby 2021-04-03 10:03:45 -04:00
rvcas
22d8659215 feat(bitcode): implement the unique case for List.reverse 2021-04-03 08:10:11 -04:00
rvcas
98f0d1a749 chore(gen/llvm): remove list_reverse_help 2021-04-02 02:05:05 -04:00
rvcas
17b39fa1ce feat(bitcode/list): implement listReverse 2021-04-02 02:00:46 -04:00
rvcas
1459679faf feat(gen/llvm): call_bitcode_fn for list_reverse 2021-04-02 01:59:27 -04:00
Folkert
61b7be7838 remove pub fn 2021-04-01 21:45:50 +02:00
Folkert
ff3f231155 remove Mode from stdlib 2021-04-01 21:42:38 +02:00
Folkert
f2c144f58c Merge remote-tracking branch 'origin/can-builtins-simplify' into list-range 2021-03-31 11:34:32 +02:00
Folkert
5d8d2bb030 Merge remote-tracking branch 'origin/trunk' into can-builtins-simplify 2021-03-31 11:29:33 +02:00
Richard Feldman
29c5a7c447
Merge pull request #1133 from rtfeldman/type-start-parse-error
Pattern In Parens
2021-03-30 23:25:04 -04:00
Richard Feldman
a1de6925c8 Merge remote-tracking branch 'origin/trunk' into type-start-parse-error 2021-03-30 23:10:43 -04:00
Richard Feldman
4dc1018aee
Merge pull request #1130 from rtfeldman/rc-missed-opt
fix missed RC optimization opportunity
2021-03-30 23:06:41 -04:00
Richard Feldman
5c721acf6c
Merge pull request #1128 from rtfeldman/docs-for-type-aliases
Docs for type aliases
2021-03-30 22:56:13 -04:00
Richard Feldman
24ef9aa81a
Merge pull request #1126 from rtfeldman/list-walk-until
List walk until
2021-03-30 22:08:35 -04:00
Folkert
e3293f1ba9 remove list sum and product lowlevel ops 2021-03-30 22:55:27 +02:00
Eric Henry
eca753f6a4 helper function, typo fix, remove debug code 2021-03-30 16:51:57 -04:00
Folkert
5cfc9c1d85 implement List.sum and List.product in roc can AST 2021-03-30 22:19:37 +02:00
Folkert
0bd05f3ecf remove second macro def 2021-03-30 21:23:06 +02:00
Lucas
15203e3584
Merge branch 'trunk' into applied_tag_functions 2021-03-30 11:34:24 -04:00
Eric Henry
7045737669 sortWith boilerplate done 2021-03-30 11:05:31 -04:00
Eric Henry
739b859a50 pattern in parens test cases 2021-03-30 10:23:50 -04:00
Eric Correia
c827b52aba Merge branch 'trunk' of github.com:rtfeldman/roc into type-start-parse-error 2021-03-30 08:38:34 -04:00
Folkert de Vries
cebf5db894
Merge branch 'trunk' into rc-missed-opt 2021-03-30 14:13:24 +02:00
Folkert
1ac7ed1bfd fix missed RC optimization opportunity 2021-03-30 14:09:46 +02:00
Chadtech
b100efa511 Set type in Set.roc 2021-03-30 01:30:47 -04:00
Chadtech
ce6bdfc757 If the docs encounter a break in the comments, we should forget about the accumulated docs until then, since they did not pertain to what we were building docs for 2021-03-30 00:54:04 -04:00
Chadtech
62b4ce0598 Put List private tag list 2021-03-30 00:53:20 -04:00
Chadtech
1df89ccbbe Aliases now rendered in docs 2021-03-30 00:52:47 -04:00
Folkert
eba295033d clippy 2021-03-29 23:07:21 +02:00
Folkert
d718e21fd3 add List.range 2021-03-29 23:00:49 +02:00
Folkert
f7f9ec7de6 fix test 2021-03-29 21:17:14 +02:00
Folkert
1dd8c25e12 implement walk until 2021-03-29 20:54:38 +02:00
Folkert
1302ee296f refactor list walking 2021-03-29 16:32:43 +02:00
Folkert
9c56fbc6d1 add flag to not fail on problems (so we can see runtime errors in action) 2021-03-29 16:07:30 +02:00
Folkert
bbeb89d027 fix mono test 2021-03-29 15:40:03 +02:00
Folkert
2f087ae7b4 add missing #[test] 2021-03-29 15:39:19 +02:00
Folkert
5babeb9d5a remove runtime_errors field 2021-03-29 15:38:52 +02:00
Folkert
07d9fb3cc3 Merge remote-tracking branch 'origin/trunk' into panic-on-type-error 2021-03-29 15:11:24 +02:00
rvcas
e4babd4445 chore(unify): move re-used logic into a helper function for TagUnion and Func 2021-03-28 23:42:29 -04:00
Lucas
7013ad49f9
Merge branch 'trunk' into applied_tag_functions 2021-03-28 21:56:29 -04:00
Ju Liu
4b8a9a5299 Add more tests 2021-03-28 23:53:35 +01:00
rvcas
a0b9d8c5eb chore(mono/layout): remove useless import 2021-03-28 17:06:40 -04:00
Lucas
58b6a333d6
Merge branch 'trunk' into applied_tag_functions 2021-03-28 17:01:28 -04:00
rvcas
7628904019 feat(mono/ir): implement applied tag functions 2021-03-28 17:00:50 -04:00
rvcas
48b1b62aaa tests(test_gen): add get_tags tests for applied tag functions 2021-03-28 17:00:09 -04:00
Richard Feldman
51e7720658
Merge branch 'trunk' into add-num-log 2021-03-28 12:43:51 -04:00
Richard Feldman
706aaa26d3
Merge pull request #1122 from rtfeldman/num-sqrt-bugfix
Fix bug in Num.sqrt
2021-03-28 12:42:44 -04:00
Ju Liu
8ccdeefdf2 Fix bug in Num.sqrt 2021-03-28 17:23:47 +01:00
Ju Liu
c48f415058 fix small typo 2021-03-28 17:13:12 +01:00
Ju Liu
cd59af1f9a Rename error to LogNeedsPositive 2021-03-28 17:09:42 +01:00
Ju Liu
0190bbb06d Add test for Num.log 2021-03-28 15:14:43 +01:00
Ju Liu
928249df2a Add Num.log and wire it up 2021-03-28 15:02:45 +01:00
rvcas
6e1f42f990 Merge branch 'trunk' into applied_tag_functions 2021-03-27 18:00:46 -04:00
rvcas
fe9e9af576 tests(test_gen): add tests for mono 2021-03-27 18:00:36 -04:00
Peter Fields
3b07a7885c format files 2021-03-27 20:50:21 +00:00
Folkert
5f72983c82 add tests 2021-03-27 21:28:56 +01:00
Peter Fields
fed470b316 add list-product builtin function 2021-03-27 20:15:16 +00:00
Folkert
5a8eb2ab39 on specialize failure, call runtime error function 2021-03-27 19:55:59 +01:00
Eric Henry
339a555b83 initial error reporting 2021-03-27 09:45:31 -04:00
Folkert
3b458309c6 WIP emit runtime error functions on specialization failure 2021-03-26 21:57:50 +01:00
Folkert
d396477fb6 fix typo 2021-03-26 21:13:51 +01:00
Richard Feldman
3f76c6314c
Merge branch 'trunk' into ir-cleanup 2021-03-26 12:59:32 -04:00
Richard Feldman
9f73c576f3 macro_use must be in crate root 2021-03-26 09:46:33 -04:00
Richard Feldman
6dc5aa2901 Allow dead code on a couple of helpers 2021-03-26 09:16:23 -04:00
Richard Feldman
e5bbca477d Revert "Drop some unused helpers"
This reverts commit 09cf687349.
2021-03-26 09:15:08 -04:00
Richard Feldman
0cd8ea5cea Re-add indoc in the right place 2021-03-26 09:14:43 -04:00
Richard Feldman
09cf687349 Drop some unused helpers 2021-03-26 08:45:47 -04:00
Richard Feldman
41614c9957 Appease clippy 2021-03-26 08:39:06 -04:00
Richard Feldman
eadb28b95d Replace a bunch of Into impls with Froms 2021-03-26 08:39:01 -04:00
Richard Feldman
7d004c48b1 Use &Path over &PathBuf 2021-03-26 08:26:45 -04:00
Richard Feldman
a66c60cf4d
Merge pull request #1111 from rtfeldman/docs-improvements
Fix some docs styles on mobile
2021-03-26 08:21:55 -04:00
Richard Feldman
6e95d05a57 Add some more clippy allows 2021-03-26 07:46:16 -04:00
Richard Feldman
71b97fb4aa
Merge branch 'trunk' into ir-cleanup 2021-03-25 22:57:54 -04:00
Richard Feldman
0fcef18c88
Merge pull request #1110 from rtfeldman/docs-improvements
Docs improvements
2021-03-25 22:57:44 -04:00
Richard Feldman
202a80df44 Allow upper case acronyms in clippy
This is not a big deal, and not worth changing in a bunch of places
just to appease clippy.
2021-03-25 22:55:29 -04:00
Richard Feldman
2d89df7f67 Improve some docs 2021-03-25 22:49:50 -04:00
Richard Feldman
665656bd35
Fix typo 2021-03-25 22:35:22 -04:00
Folkert
132ba77a47 fix comment mistaken for doc test 2021-03-25 21:41:19 +01:00
Folkert
9273c74c70 another attempt to tame this grammar 2021-03-25 21:18:26 +01:00
Folkert
89f5e0465e Revert "WIP emit runtime error functions on specialization failure"
This reverts commit 090a7063d5.
2021-03-25 16:57:01 +01:00
Folkert
090a7063d5 WIP emit runtime error functions on specialization failure 2021-03-25 16:56:47 +01:00
Folkert de Vries
5f36da98ee
Merge branch 'trunk' into ir-cleanup 2021-03-25 15:08:54 +01:00
Folkert
369f1b7cbb don't lie about progress 2021-03-25 15:08:02 +01:00
rvcas
9da0193f2c Merge branch 'trunk' into applied_tag_functions 2021-03-24 23:05:44 -04:00
Folkert
2a0c5c669b fiddling with the when parser 2021-03-24 22:55:01 +01:00
rvcas
f8a6cd6a74 feat(unify): clean up with @folkertdev 2021-03-24 15:37:23 -04:00
rvcas
6aaa12079d tests(test_reporting): properly testing a mismatch for applied tag functions 2021-03-24 15:36:52 -04:00
rvcas
6009501114 tests(solve_expr): mismatch still not properly being reported 2021-03-23 22:46:48 -04:00
rvcas
7148522e15 Merge branch 'trunk' into applied_tag_functions 2021-03-23 19:29:03 -04:00
Folkert
dd8bdcb806 show platform header in error messages 2021-03-23 23:00:18 +01:00
Folkert
c9f396b985 test function pattern shadowing error 2021-03-23 22:10:07 +01:00
Folkert
715ab9ff2e actually blow up on invalid pattern 2021-03-23 22:01:22 +01:00
Folkert
d91e810bd8 fix test compilation 2021-03-23 16:34:09 +01:00
Folkert
169e34b583 fix parser problem in Dict.roc 2021-03-23 16:15:56 +01:00
Folkert
4418a99c89 include header in fatal parse errors 2021-03-23 16:14:20 +01:00
Folkert
e3b65b1ce0 Merge remote-tracking branch 'origin/trunk' into import-builtin-mod 2021-03-23 15:40:27 +01:00
Folkert
9a4518ce6b test for missing files 2021-03-23 15:38:36 +01:00
Folkert
4f8f2e01dc more refactor 2021-03-23 14:45:06 +01:00
Folkert
589b579689 refactor 2021-03-23 14:31:35 +01:00
Richard Feldman
a8168a8022
Merge branch 'trunk' into repl-docs 2021-03-22 19:53:01 -04:00
rvcas
eb4a6109d6 tests(solve_expr): try a mismatch 2021-03-22 11:25:51 -04:00
Folkert
55cb780249 don't clone Layout 2021-03-22 14:08:48 +01:00
Folkert
fa013e7d01 make layout Copy 2021-03-22 13:21:30 +01:00
Folkert
2fce825366 pass by reference 2021-03-22 13:18:16 +01:00
Folkert
e042c73aff clippy 2021-03-22 13:13:10 +01:00
Folkert
ca9048ee17 cleanup 2021-03-22 13:10:38 +01:00
Folkert
addf130be5 optimize Path 2021-03-22 13:09:56 +01:00
Folkert
fdebfa6b3f cloning 2021-03-22 11:58:13 +01:00
Chadtech
40006bfe24
Merge branch 'trunk' into repl-docs 2021-03-22 00:57:13 -04:00
rvcas
91d98d2463 Merge branch 'trunk' into applied_tag_functions 2021-03-22 00:56:42 -04:00
rvcas
b806df1b92 tests(solve_expr): add some comments so know which branch 2021-03-22 00:55:39 -04:00
Chadtech
e6d900b978 Vertical List.roc exports 2021-03-22 00:55:05 -04:00
Chadtech
35c7bb7a5a Correct errors in List.roc 2021-03-22 00:54:42 -04:00
rvcas
b063b45481 feat(unify): we were actually hitting the second case but desc now comes from first 2021-03-22 00:50:03 -04:00
Folkert
41e61ba38a Subs efficiency 2021-03-22 02:04:59 +01:00
Folkert
7bb367713c Merge remote-tracking branch 'origin/trunk' into ir-cleanup 2021-03-22 00:35:00 +01:00
Richard Feldman
e1c70fddec
Merge pull request #1093 from rtfeldman/type-identifier-messages
Type identifier messages
2021-03-21 19:20:18 -04:00
Folkert
5bbea3510f fix tab case 2021-03-21 23:42:34 +01:00
Folkert
03a90faa37 clippy 2021-03-21 22:53:05 +01:00
Folkert
b681923270 report malformed type names in annotations 2021-03-21 22:52:23 +01:00
Folkert
ef211ce49a clippy 2021-03-21 22:15:47 +01:00
Folkert
f3318fbc2f more Copy 2021-03-21 21:38:11 +01:00
Folkert
ce98da9d04 remove Nested from Def 2021-03-21 21:14:32 +01:00
Folkert
52854a6f57 make Def and TypeAnnotation Copy 2021-03-21 21:08:16 +01:00
Folkert
f3fc9f450f make ast::Expr Copy 2021-03-21 21:05:36 +01:00