Commit Graph

663 Commits

Author SHA1 Message Date
Folkert
0ec1c49042 slightly optimize rank calculation 2021-05-05 15:02:52 +02:00
Folkert
cd1103df64 bumpalo allocator sadness; revert later 2021-05-02 01:09:16 +02:00
rvcas
1271799f30 feat(Expr2): constrain Float 2021-04-30 21:51:55 -04:00
rvcas
ea7d735c9a test: constrain Expr2::Float 2021-04-30 21:50:21 -04:00
rvcas
91c01856c4 test: pass arena to run_solve in infer_eq 2021-04-29 23:05:48 -04:00
rvcas
173fddfbeb feat(editor): pass arena to solve in EdModel 2021-04-29 23:05:31 -04:00
rvcas
e65ab4d246 feat(Expr2): solve no longer uses ImMap in favor of BumpMap 2021-04-29 23:04:57 -04:00
rvcas
a668e1622e feat(Expr2): LetConstraint::def_types uses BumpMap now instead of SendMap 2021-04-29 22:56:03 -04:00
Richard Feldman
d2fbf8b0e5
Merge branch 'trunk' into constrain_expr2_small_int 2021-04-28 07:53:00 -04:00
Anton-4
25e282593f removed unwrap 2021-04-27 18:32:41 +02:00
Anton-4
73a9d34514 fmt 2021-04-27 17:41:27 +02:00
Anton-4
d60b9ea1a3 Merge branch 'trunk' of github.com:rtfeldman/roc into editor_small_int 2021-04-27 17:27:05 +02:00
Anton-4
19353a7951 cleanup refactor 2021-04-27 17:26:29 +02:00
Lucas
88a95b0d8c
Merge branch 'trunk' into constrain_expr2_small_int 2021-04-27 11:23:08 -04:00
Folkert
6662fbb791 fix idents 2021-04-27 17:05:47 +02:00
Anton-4
ca23881199 removed profiling setup 2021-04-27 12:12:56 +02:00
Anton-4
3981b0f7b7 editor ideas, pprof flamegraph setup, fixed slow int 2021-04-27 12:08:30 +02:00
Anton-4
8e10ba659e completed int support, added int tests + added int cases to previuous test, fixed colon ignore failure, allowed ctrl+shift+up when caret at line end 2021-04-26 19:33:34 +02:00
Anton-4
276f8e2f34 partial SmallInt support 2021-04-24 20:11:54 +02:00
Anton-4
f245655f42 improved editor README 2021-04-24 11:58:37 +02:00
Anton-4
e91e21e4c7 added invalid input chars tip to editor 2021-04-24 11:03:45 +02:00
rvcas
0bd24ba4fd feat(editor/solve): enable Alias and TagUnion in type_to_variable 2021-04-23 23:17:18 -04:00
Lucas
540e57160a
Merge branch 'trunk' into constrain_expr2_small_int 2021-04-23 22:03:18 -04:00
rvcas
a562a772d1 feat(editor/solve): enable Let and And constraints 2021-04-23 22:02:33 -04:00
Anton-4
e609bc4875 tests for caret move and backspace after ctrl+shift+up 2021-04-23 19:36:42 +02:00
rvcas
f6fddfe260 feat: add a test case and implement shallow clone for Type2 2021-04-23 12:29:20 -04:00
rvcas
ab92789984 fix: clean redundant num_type using shallow_clone 2021-04-23 09:55:51 -04:00
rvcas
ff6c1b9c43 fix: use ShallowClone from pool 2021-04-23 09:47:42 -04:00
Lucas
2507274be5
Merge branch 'trunk' into constrain_expr2_small_int 2021-04-23 00:26:47 -04:00
rvcas
0a6dbccaee feat: bring in some of the builtins from constrain 2021-04-23 00:24:09 -04:00
Richard Feldman
60be120fc1 Rename COPYRIGHT_DETAILS to LEGAL_DETAILS
Turns out GitHub's `Licensee` gem treats any file with the word
"copyright" in it as a potential license, and therefore doesn't
recognize and list Roc's license as UPL-1.0 because it thinks
there might be two licenses or something.

d274e47c71/lib/licensee/project_files/license_file.rb (L26)
2021-04-22 21:52:07 -04:00
Richard Feldman
f34a75f26e Rename COPYRIGHT file to COPYRIGHT_DETAILS
This way, GitHub's license finder doesn't get confused.
(They use the `Licensee` Ruby gem, which looks for files like
LICENSE, which we have, but also COPYRIGHT - and it apparently
gets confused if it sees both.)
2021-04-22 21:41:11 -04:00
rvcas
6571d829a1 fix: use bump for Constraint enum instead of pool 2021-04-22 21:32:47 -04:00
Lucas
e0052cb720
Merge branch 'trunk' into constrain_expr2_small_int 2021-04-22 21:29:02 -04:00
Folkert
700e7d9686 parse expect 2021-04-22 23:00:44 +02:00
Richard Feldman
483bbd48dd
Merge pull request #1217 from rtfeldman/selection_tests
many ctrl+shift+up tests
2021-04-21 20:50:48 -04: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
Anton-4
9e2e811582 ctrl+shift+up tests 2021-04-21 19:24:43 +02:00
Anton-4
721ef6405d cleanup 2021-04-21 11:33:06 +02:00
Lucas
eec7a9db55
Merge branch 'trunk' into constrain_expr2_small_int 2021-04-20 20:01:57 -04:00
Anton-4
6232e4716c connected tooltip rendering with constraints stuff 2021-04-20 19:39:10 +02:00
Anton-4
2c055c28f1 added comments for test helper functions 2021-04-20 11:58:16 +02:00
Anton-4
c3f22a6689 Merge branch 'trunk' of github.com:rtfeldman/roc into empty_record_tooltip 2021-04-20 11:39:09 +02:00
Anton-4
0703b2454b replaced String with PoolStr in SelectedExpression.type_str. Set up tooltip test for empty record. closes #1213 #1214 2021-04-20 11:38:17 +02:00
Richard Feldman
da8f8e5712
fix typo in comment 2021-04-19 18:50:41 -04:00
Anton-4
c3a562ccb4 fmt 2021-04-19 17:58:19 +02:00
Anton-4
d29d227163 Merge branch 'trunk' of github.com:rtfeldman/roc into tooltip 2021-04-19 17:54:08 +02:00
Anton-4
e5ed330fc2 function rename 2021-04-19 17:53:44 +02:00
Anton-4
23d2b2d407 type tooltip rendering 2021-04-19 15:55:32 +02:00
Folkert de Vries
4a48f85108
Merge branch 'trunk' into bump-hashbrown 2021-04-18 15:38:35 +02:00
Folkert
383f35db5a bump bumpalo 2021-04-18 14:36:47 +02:00
Lucas
70650b7979
Merge branch 'trunk' into constrain_expr2_small_int 2021-04-18 01:05:03 -04:00
rvcas
7ffe44d336 feat: very basic and incorrect SmallInt constraint 2021-04-17 20:34:59 -04:00
rvcas
689e2f3368 feat: add a fall through case for solve match 2021-04-17 20:34:33 -04:00
Richard Feldman
79264b53b6
Merge branch 'trunk' into selection 2021-04-17 14:23:20 -04:00
Richard Feldman
1f78e29b3c
Merge pull request #1202 from rtfeldman/constrain_expr2_empty_record
Constrain Expr2::EmptyRecord
2021-04-17 14:23:11 -04:00
Anton-4
633e10f9e9 tooltip on expression selection progress 2021-04-17 19:46:28 +02:00
Anton-4
216cd9f773 type 2021-04-17 16:18:46 +02:00
Anton-4
a0295381f7 changed PresentMode from Immediate to Mailbox, Immediate causes crash on close if something has been selected 2021-04-17 15:58:20 +02:00
Anton-4
63723805e8 simplification 2021-04-17 15:31:32 +02:00
Anton-4
f3a8b792ed
Merge branch 'trunk' into selection 2021-04-17 12:48:56 +02:00
Anton-4
8f6afab13e fmt, cleanup, improved comments 2021-04-17 12:46:51 +02:00
Anton-4
97c67de37b cleanup 2021-04-16 19:28:52 +02:00
Anton-4
aa73df1b63 lowered selection rectangle opacity 2021-04-16 18:14:05 +02:00
Anton-4
6eb1d28502 ctrl+shift+up to select surrounding expression, backspace to replace selected expression with blank 2021-04-16 17:25:30 +02:00
rvcas
23f8eb62a8 feat(Expr2): constrain empty record 2021-04-15 21:42:06 -04:00
rvcas
47f1bad862 test(editor): constrain empty record 2021-04-15 21:41:15 -04:00
Richard Feldman
e02da00e4f Drop obsolete comment 2021-04-15 18:32:57 -04:00
Anton-4
721037bc14 ast_node based selection, node backspace in progress 2021-04-14 19:57:53 +02:00
Richard Feldman
23b29496ce Use PresentMode::Immediate again
Fixes #1058

It seems this was already working prior to the wgpu-rs 0.7.1 upgrade,
possibly by changing the shaders to wgsl:
https://github.com/rtfeldman/roc/issues/1058#issuecomment-818720570
2021-04-13 09:07:52 -04:00
Richard Feldman
a1a08fbb8a
Merge branch 'trunk' into edit_big_string 2021-04-13 08:36:56 -04:00
Anton-4
9ac80c740f can now create long strings in the editor 2021-04-13 13:03:33 +02:00
Anton-4
b1f226e876
Merge branch 'trunk' into editing_tests 2021-04-13 10:00:17 +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
c55c35e164 extend solve 2021-04-12 23:29:07 +02: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
Anton-4
6cf21eff17 removed old comment 2021-04-12 19:17:15 +02:00
Anton-4
c10ed8ffb9 removed unnecessary comment 2021-04-12 19:05:59 +02:00
Anton-4
5cc3e9b2b3 fmt 2021-04-12 18:56:48 +02:00
Anton-4
8b980660da removed unneeded comment 2021-04-12 17:54:55 +02:00
Anton-4
028f57d1c3 Added byte size for PoolVec<RecordField> 2021-04-12 17:50:04 +02:00
Anton-4
1a9307a903 Merge branch 'trunk' of github.com:rtfeldman/roc into editing_tests 2021-04-12 17:33:54 +02:00
Anton-4
33184b60f8 finished hadnle_new_char tests, bugfixes 2021-04-12 17:33:22 +02:00
Anton-4
81f44b936b replaced sleection [,] and | with special unicode alternatives 2021-04-12 10:33:30 +02:00
Richard Feldman
792a18816a Update authors in Cargo.toml 2021-04-11 08:11:52 -04:00
Richard Feldman
6ae02e860c
Merge branch 'trunk' into start_typechecking_expr2 2021-04-11 07:49:46 -04:00
Richard Feldman
9133dfa0fb
Merge branch 'trunk' into recursive-defs 2021-04-11 07:47:25 -04:00
Richard Feldman
ba7d937eca
Merge branch 'trunk' into start_typechecking_expr2 2021-04-11 07:33:53 -04:00
Folkert
112e97c4a2 improve circular definition error reporting 2021-04-10 21:39:20 +02:00
rvcas
3ccbb2a06f fix(pool): as_str use from_raw_parts 2021-04-10 15:28:41 -04:00
Anton-4
0356d23116 RecordField stuff, more tests, new selection and caret symbols 2021-04-10 20:26:04 +02:00
rvcas
e0a1a917c0 feat(editor): add constrain tests 2021-04-10 12:58:44 -04:00
rvcas
bb51f15494 feat(editor): add constrain module 2021-04-10 12:58:29 -04:00
rvcas
36e6739212 feat(editor): depend on roc_solve 2021-04-10 12:58:02 -04:00
Anton-4
76d7673b03 added ignore tests, set better case for panicking test 2021-04-10 12:02:15 +02:00
Anton-4
dd5e17c340 panic: LabelOnly record field was not desugared 2021-04-10 10:57:27 +02:00
Anton-4
bfa40deb90 hanlde_new_char tests, improved pest parser, bugfix 2021-04-09 19:44:41 +02:00
Anton-4
1c3f3b2b38 improved comment, simplified simple_move_carets_right 2021-04-07 20:00:17 +02:00
Anton-4
e8b06fc98c nested single field records, correct rejection of input 2021-04-07 18:53:57 +02:00
Anton-4
b0f3d5a7b1 improved ed_update flow, removed old shader stuff; now using wgsl instead 2021-04-07 13:21:04 +02:00
Anton-4
db074cd4f4 return Ignored or Accepted for input handling 2021-04-05 12:23:42 +02:00
Anton-4
8e28fecbcb removed unnecessary pub on NodeId 2021-04-02 20:11:26 +02:00
Anton-4
f4ed7af96b added extra quotes for values of SmallStr, Str 2021-04-02 19:41:19 +02:00
Anton-4
a46929b759 cleanup 2021-04-02 19:30:01 +02:00
Anton-4
bc20ba3a3b full debug view working 2021-04-02 18:11:07 +02:00
Anton-4
bf5ad8df98 debug view for mark_node_pool, code_lines, grid_node_map 2021-04-02 12:16:31 +02:00
Anton-4
9341c8dac2 got room for one more char in ArrayString 2021-03-31 12:58:49 +02:00
Anton-4
fb622c841f refactoring 2021-03-30 20:03:46 +02:00
Anton-4
1332d6e01d working input of string literal 2021-03-30 18:08:27 +02:00
Anton-4
0b81f8bd52 fixed caret movement, fixed char insertion offset for record fields 2021-03-29 19:45:45 +02:00
Anton-4
0cb6af04fd expanded comment 2021-03-29 12:02:33 +02:00
Anton-4
661f5f2adc removed unnecessary clone 2021-03-29 11:52:17 +02:00
Anton-4
a1f6fb206a actually set ed_model.dirty=false after new render 2021-03-29 11:31:11 +02:00
Anton-4
5d43ffcbee Merge branch 'trunk' of github.com:rtfeldman/roc into input_record 2021-03-27 19:17:17 +01:00
Anton-4
0dc2e1780b cleanup of update on new input 2021-03-27 18:23:34 +01:00
Anton-4
bf0e755df4 added adjustment of grid_node_map and AST node when colon is entered 2021-03-27 15:12:00 +01:00
Anton-4
5d85ff8b07 able to input one item record without value as described in #1046 2021-03-27 13:49:32 +01:00
Anton-4
697b257ead stuck on pool borrow error 2021-03-26 18:11:23 +01:00
Richard Feldman
0fcef18c88
Merge pull request #1110 from rtfeldman/docs-improvements
Docs improvements
2021-03-25 22:57:44 -04:00
Richard Feldman
e8c2bef5a9 Appease new clippy lints 2021-03-25 22:55: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
Anton-4
bcdc4223aa added line-column->node_id mapping, progress on inputting record 2021-03-24 19:50:24 +01:00
Anton-4
3feedb9248 do all tree modifications when user presses { 2021-03-23 19:38:42 +01:00
Anton-4
01423ff2b7 working caret movement left, right, up, down, home, end 2021-03-23 12:26:17 +01:00
Anton-4
6ab71f9ab9 new caret structure progress, renamed BigSelectedText to BigTextArea 2021-03-22 20:13:49 +01:00
Folkert
ce98da9d04 remove Nested from Def 2021-03-21 21:14:32 +01:00
Folkert
2827af7e59 remove Nested from pattern 2021-03-21 21:03:37 +01:00
Folkert
197835b6ed remove nested in expr 2021-03-21 20:56:18 +01:00
Richard Feldman
e238c2e202
Merge pull request #1090 from rtfeldman/binop-improvements
Binop improvements
2021-03-20 21:59:43 -04:00
Folkert
1871697b0f remove BinOp variant 2021-03-20 23:01:12 +01:00
Folkert
e0c211081a remove update field from normal Record constructor 2021-03-20 16:49:14 +01:00
Folkert
d22acb521e use record for PrecedenceConflict 2021-03-20 15:07:15 +01:00
Anton-4
fd6eb41625
Merge branch 'trunk' into move_caret 2021-03-19 18:06:30 +01:00
Anton-4
f0c100e0b9 minor cleanup 2021-03-19 18:04:33 +01:00
Anton-4
41144032b0 move_caret_right works with multi-level nested nodes 2021-03-19 17:43:16 +01:00
Anton-4
9db5f9c607 move_carets_right function works 2021-03-19 11:05:47 +01:00
Folkert
dc7c384b49 expose less 2021-03-18 14:52:37 +01:00
Anton-4
ac41c099bc almost done with move_caret_right 2021-03-17 20:14:50 +01:00
Anton-4
a5a0d2270f almost done with move_caret_right 2021-03-16 20:20:56 +01:00
Anton-4
afe0dc16ea added parent_id to MarkupNode, created SlowPool mock because Pool can not with a mix of 64 and 32 byte nodes, renamed Hole to Blank: closes #1080 2021-03-16 16:21:14 +01:00
Anton-4
64a88dd31c minor cleanup, more comments 2021-03-15 16:12:00 +01:00
Anton-4
c0dbea6ab1 Merge branch 'trunk' of github.com:rtfeldman/roc into markup 2021-03-15 13:34:53 +01:00
Anton-4
2cb7341888 create ast+markup from roc file, editor idea 2021-03-15 13:16:12 +01:00
Anton-4
a0c417c3fa Added caret drawing, rustfmt 2021-03-13 19:59:26 +01:00
Anton-4
3911a887f9 fixed rectangle drawing, discovered pool memory consumption issue 2021-03-13 17:05:49 +01:00
Anton-4
4d3025786c resolved errors, but rects are invisible 2021-03-13 13:41:05 +01:00
Anton-4
fdfdd80735 resolved some errors+warnings, stuck on borrowed data escapes closure 2021-03-13 11:30:42 +01:00
Anton-4
288061744f markup types, conversion, almost don with rendering 2021-03-12 19:59:41 +01:00
Folkert
9c95392cc6 Merge remote-tracking branch 'origin/trunk' into opt-parser 2021-03-12 03:47:49 +01:00
Folkert
cba55734cb clean up helpers 2021-03-12 03:41:01 +01:00
Folkert
4e4854ceaa remove unneeded argument 2021-03-12 02:48:07 +01:00
Folkert
e214674016 cleanup blankspace function usage 2021-03-11 16:37:42 +01:00
Richard Feldman
dd4d447bf1
Merge pull request #1062 from rtfeldman/parse-header
Parse header
2021-03-10 21:54:51 -05:00
Anton-4
09cab08905 rendering with AST containing Caret and Hole(Box) 2021-03-10 19:51:25 +01:00
Anton-4
5742bd2c3c removed unnecessary static 2021-03-10 12:58:16 +01:00
Anton-4
f51f3d962f stuck on lifetime errors 2021-03-10 12:50:12 +01:00
Folkert
91271d0308 don't leak implementation details 2021-03-09 23:20:31 +01:00
Anton-4
f1e61d943e ast caret progress 2021-03-09 19:52:16 +01:00
Folkert
65cee39041 remove attempting argument from parser state 2021-03-08 16:33:45 +01:00
Anton-4
72de6c3d9c Merge branch 'trunk' of github.com:rtfeldman/roc into update_deps 2021-03-08 13:09:07 +01:00
Anton-4
8aa0006e89 done updating editor dependencies to latest version 2021-03-08 12:25:55 +01:00
Richard Feldman
93e8698007
Merge pull request #1050 from rtfeldman/home_end_keys
Home+End keys tests and bug fixes
2021-03-07 23:08:19 -05:00
rvcas
fdbb32d88a Merge branch 'trunk' into config_persistance 2021-03-06 18:16:55 -05:00
Anton-4
480666e4e3 removed unused dependencies using cargo-udeps #1036 2021-03-06 12:07:09 +01:00
rvcas
dd52292e21 fix(editor): leave workspace Cargo.toml alone and move git ref to editor toml 2021-03-06 00:19:06 -05:00
Lucas
5637dc6e6e
Merge branch 'trunk' into config_persistance 2021-03-06 00:16:49 -05:00
rvcas
be81cc0371 feat(editor): use confy master branch until 0.5.0 is tagged and released 2021-03-06 00:13:46 -05:00
Richard Feldman
af21bc955e
Merge branch 'trunk' into home_end_keys 2021-03-05 22:55:31 -05:00
rvcas
386c72c93d feat(editor): add confy and serde to persistent and load config 2021-03-05 10:41:19 -05:00
Anton-4
ac3ab6618f home+end keys tests and bug fixes 2021-03-05 15:39:05 +01:00
Anton-4
9fa34cda22 home-end bugfixes+partial tests 2021-03-03 20:04:26 +01:00
Folkert
89dcff29e4 Merge remote-tracking branch 'origin/trunk' into parse-record-expr 2021-03-02 13:55:11 +01:00
Folkert
663ffdeb88 more cleanup 2021-03-01 19:04:57 +01:00
Folkert
d19d80ef2e Merge remote-tracking branch 'origin/trunk' into parse-record-expr 2021-03-01 15:27:03 +01:00
Folkert
7c56547958 cleanup 2021-03-01 00:38:03 +01:00
Anton-4
fe916f0d03 refactoring for home and end keys, better Modifiers abstraction 2021-02-27 19:52:28 +01:00
Anton-4
d153e580a1 rustfmt 2021-02-26 19:23:41 +01:00
Anton-4
e667ca6af6 removed TODO 2021-02-26 19:21:44 +01:00
Anton-4
4e05db3038 Merge branch 'trunk' of github.com:rtfeldman/roc into syntax_high_ast 2021-02-26 18:39:18 +01:00
Anton-4
7610ad38f8 got rid of HashMap unwrap 2021-02-26 18:22:44 +01:00
Anton-4
1e255f0c69 Merge branch 'trunk' of github.com:rtfeldman/roc into easier_colors 2021-02-26 14:47:00 +01:00
Anton-4
8c1f9640d6
Merge branch 'trunk' into pool_str_as_str 2021-02-26 13:00:21 +01:00
Richard Feldman
1222c9aeaa
Merge pull request #1028 from rtfeldman/parse-if-list
Improved error messages for list & if
2021-02-25 22:27:30 -05:00
rvcas
4813b924a2 feat(render_ast): use new PoolStr.len/1 and PoolStr.as_str/1 2021-02-25 19:33:59 -05:00
rvcas
0e21fa5d35 feat(PoolStr): change Pool.get_str/1 to PoolStr.as_str/1 2021-02-25 19:33:29 -05:00
Richard Feldman
543e712659
Merge pull request #1026 from rtfeldman/expr2-to-str
Use strings for Expr2 render positioning
2021-02-24 18:34:08 -05:00
Anton-4
c501529685 almost done with ast-backed syntax highlighting 2021-02-24 20:07:30 +01:00
Anton-4
307f0cb9dd Merge branch 'trunk' of github.com:rtfeldman/roc into easier_colors 2021-02-24 10:31:35 +01:00
Anton-4
2ff76267e1 fmt 2021-02-24 10:30:40 +01:00
Folkert
b46467087a Merge remote-tracking branch 'origin/trunk' into parse-if-list 2021-02-23 23:23:05 +01:00
Anton-4
f8944468a4 hsb colors, themes, settings 2021-02-23 19:43:50 +01:00
Anton-4
5b8e52b577 fixes test_big_sel_text failures 2021-02-23 15:00:51 +01:00
Folkert
30ecd378a0 refactor parse AST to allow multiple if branches 2021-02-23 14:31:48 +01:00
Anton-4
005e548757 Merge branch 'trunk' of github.com:rtfeldman/roc into expr2-to-str 2021-02-23 10:39:45 +01:00
Anton-4
b505a479ef fmt 2021-02-23 10:21:15 +01:00
Anton-4
004474f3fc finished conversion to use arena 2021-02-23 10:07:00 +01:00
Anton-4
361ba3ae6c expr2_to_str arena conversion progress 2021-02-22 19:55:04 +01:00
Anton-4
1ef33c42cb Use strings for expr2 positioning 2021-02-22 17:41:35 +01:00