Ayaz Hafiz
0a807dc43e
Provide warning for defs that are used only in (mutual) recursion
...
This patch provides errors for defs that are used only in
possibly-mutual recursion, and are not reachable outside of their
recursive closures. For example:
```
test_report!(
mutual_recursion_not_reached_nested,
indoc!(
r#"
app "test" provides [main] to "./platform"
main =
f = \{} -> if Bool.true then "" else g {}
g = \{} -> if Bool.true then "" else f {}
""
"#
),
@r###"
── DEFINITIONs ONLY USED IN RECURSION ──────────────────── /code/proj/Main.roc ─
These 2 definitions are only used in mutual recursion with themselves:
4│> f = \{} -> if Bool.true then "" else g {}
5│> g = \{} -> if Bool.true then "" else f {}
If you don't intend to use or export any of them, they should all be
removed!
"###
);
```
2022-12-02 11:50:12 -06:00
Ayaz Hafiz
803d7e30e3
Eliminate Stmt::RuntimeError in favor of crash
2022-11-24 14:46:53 -06:00
Ayaz Hafiz
c7ef1668d4
Implement mono of crash
2022-11-24 14:46:51 -06:00
Folkert
e7f3c6f281
inline dbg
2022-11-23 21:23:28 +01:00
Prajwal S N
df7e4eea7e
builtin(str): implement Str.graphemes
...
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2022-10-22 19:29:49 -07:00
Prajwal S N
9013e4ce11
builtin(str): implement withCapacity
...
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2022-10-08 00:24:46 +05:30
Folkert de Vries
51d5aa789a
Merge pull request #3870 from roc-lang/dev-backend-div
...
add int/float division to the dev backend
2022-08-25 09:03:19 +02:00
Folkert
2d366acc6e
split out int and frac division into separate lowlevels
2022-08-23 11:07:38 +02:00
Folkert
10b6f33ed2
boilerplate
2022-08-12 13:34:36 +02:00
Folkert de Vries
1b1b63aad0
Merge branch 'trunk' into assoc-list-dict
2022-07-14 16:47:50 +02:00
Richard Feldman
77afe0c1f1
Merge pull request #3503 from rtfeldman/string-memory-problems
...
String memory problems
2022-07-13 15:17:28 -04:00
Folkert
5763248b44
Merge remote-tracking branch 'origin/trunk' into assoc-list-dict
2022-07-13 20:44:28 +02:00
Richard Feldman
25facfa9c6
Expose capacity builtins
2022-07-13 12:19:37 -04:00
Folkert
8e21fdcb04
remove dict/set lowlevels
2022-07-13 11:24:07 +02:00
Folkert
bc24841921
Str.fromUtf8Range: take list argument as owned; make sure it's decremented in the small string case
2022-07-12 22:57:48 +02:00
Folkert
e8530eaca5
improve lowlevel unwrapping
2022-07-08 22:13:13 +02:00
Folkert
41768bfa97
new approach for defining our builtins
2022-07-08 13:46:34 +02:00
Folkert
56c9787e8f
List.appendUnsafe and List.reserve
2022-07-07 22:40:28 +02:00
Folkert de Vries
0412578e49
Merge pull request #3433 from rtfeldman/url-appending-fixes
...
url appending fixes
2022-07-07 11:51:40 +02:00
Folkert
c54d824950
for now, substring takes a borrowed argument
2022-07-06 17:59:49 +02:00
Folkert
3a30e77726
Merge remote-tracking branch 'origin/trunk' into list-unreachable
2022-07-06 01:38:50 +02:00
Folkert
2455819362
startsWith/endsWith don't need ownership
2022-07-06 01:08:45 +02:00
Folkert de Vries
93dbda9ac5
Merge pull request #3399 from rtfeldman/pure-roc-map-with-index
...
Pure Roc `List.mapWithIndex`
2022-07-06 00:25:46 +02:00
Folkert
6095dcff66
Merge remote-tracking branch 'origin/trunk' into list-unreachable
2022-07-04 19:21:31 +02:00
Folkert
6d7c329698
Str.walkScalars
2022-07-04 18:01:19 +02:00
Folkert
1de9270ecf
Merge remote-tracking branch 'origin/trunk' into str-walk
2022-07-04 16:30:07 +02:00
Folkert
9c41a4d442
str.appendScalar
2022-07-04 16:27:04 +02:00
Brian Carroll
a5a85d7d73
mono: delete HigherOrder variant ListMapWithIndex
2022-07-04 15:10:31 +01:00
Brian Carroll
eb2ac4c82b
module: delete LowLevel enum variant ListMapWithIndex
2022-07-04 15:07:12 +01:00
Folkert
ab721dd3c1
Str.reserve
2022-07-04 14:57:20 +02:00
Folkert
5904934887
rename countBytes -> countUtf8Bytes
2022-07-03 21:49:01 +02:00
Folkert
eeb271d07f
Str.splitFirst and Str.splitLast
2022-07-03 19:47:06 +02:00
Folkert
be3800d7fa
add substringUnsafe roc function
2022-07-03 17:15:25 +02:00
Ayaz Hafiz
8855f269ba
Make captures niche more private
2022-07-03 10:37:36 -04:00
Ayaz Hafiz
019ebd93f7
Put the capture niche in the lambda name instead of generating new names
2022-07-03 10:37:29 -04:00
Ayaz Hafiz
8be230695b
Get multimorphic lambda captures working
2022-07-03 10:37:26 -04:00
Ayaz Hafiz
51978e08ed
First pass at supporting multimorphic lambdas in lambda sets
2022-07-03 10:37:26 -04:00
Folkert
3cd56c3184
add Str.countBytes
2022-07-03 14:16:47 +02:00
Folkert
1f943a5452
add Str.getUnsafe
2022-07-03 13:46:22 +02:00
Folkert
762258ae20
Merge remote-tracking branch 'origin/trunk' into list-unreachable
2022-07-03 02:54:15 +02:00
Folkert de Vries
2a82d24847
Merge pull request #3369 from rtfeldman/pure-roc-list-walk
...
List.walk and friends in pure Roc
2022-07-03 02:32:43 +02:00
Folkert de Vries
d2c07f350d
Merge pull request #3371 from rtfeldman/starts-with-scalar
...
Str.startsWithCodePt -> Str.startsWithScalar
2022-07-03 00:22:21 +02:00
Folkert de Vries
75b4b3a206
Merge pull request #3365 from rtfeldman/to-scalars
...
Add Str.toScalars builtin
2022-07-02 23:04:28 +02:00
Brian Carroll
94181111be
Merge branch 'trunk' of github.com:rtfeldman/roc into pure-roc-list-walk
2022-07-02 21:44:42 +01:00
Richard Feldman
af05723d35
Rename startsWithCodePt to startsWithScalar
2022-07-02 15:51:33 -04:00
Folkert
506e374642
List.unreachable
2022-07-02 19:40:05 +02:00
Folkert
e29a89d33c
remove zig implementation of keepIf/keepErrs/keepOks
2022-07-02 19:38:38 +02:00
Richard Feldman
acb7cf99e1
Add Str.toScalars builtin
2022-07-02 13:12:12 -04:00
Brian Carroll
219e6d11cf
Merge branch 'trunk' of github.com:rtfeldman/roc into pure-roc-list-walk
2022-07-02 18:08:43 +01:00
Anton-4
b74fc3554b
Merge branch 'trunk' of github.com:rtfeldman/roc into crates-folder
2022-07-02 12:35:19 +02:00