J.Teeuwissen
9b410694fe
Merge branch 'main' into Frame-Limited
2023-03-30 20:38:05 +02:00
Brendan Hansknecht
48f17a8e2c
add Str.releaseExcessCapacity
2023-03-15 15:24:59 -07:00
Brendan Hansknecht
1319ba4844
add List.releaseExcessCapacity builtin
2023-03-13 17:43:21 -07:00
Brendan Hansknecht
e6964536b2
add more Num.bytesTo* functions
2023-03-12 08:41:05 -07:00
Brendan Hansknecht
785da377c8
add Num.count*Bits functions
2023-03-12 08:41:04 -07:00
Ayaz Hafiz
f7aa7e734d
Pass interner through to debug proc layouts misisng in param map
2023-02-20 18:49:29 -06:00
J.Teeuwissen
957f44966c
start perceus reference count
2023-01-26 17:13:29 +01:00
Ayaz Hafiz
fa8effd3e8
Make all layouts interned in mono
2023-01-11 14:38:41 -06:00
Folkert
a9cd6c6832
test forcing host-exposed always owning params
2023-01-10 19:17:39 +01:00
J.Teeuwissen
c2e14864ab
from_layout
2023-01-09 19:19:20 +01:00
J.Teeuwissen
b28b32cdc4
moved Ownership to borrow
2023-01-09 18:15:34 +01:00
J.Teeuwissen
a11d94aee2
Replaced equality check with enum
2023-01-06 08:55:13 +01:00
J.Teeuwissen
1f10d0cb92
Added traits and updated remaining borrowed
2023-01-05 12:02:20 +01:00
J.Teeuwissen
6ec977bf1c
imports
2023-01-04 13:34:31 +01:00
J.Teeuwissen
6c95bc1fb9
replace borrowed boolean with ownership enum
2023-01-04 13:30:42 +01:00
Ayaz Hafiz
972046445b
Lift Niche from just captures-niche to generic niche
2022-12-29 18:43:26 -06:00
Ayaz Hafiz
a31b617ac8
Collect references to functions passed to HOLLs in borrow inference
...
During borrow inference, SCCs of references between procs are first
constructed. Previously we didn't collect any references for HOLL calls,
but since such calls pass a Roc-function, we need to include a reference
to the Roc function.
2022-12-28 15:32:23 -06:00
Folkert de Vries
4022b44ff9
Merge pull request #4798 from JTeeuwissen/main
...
Replace DeclarationToIndex elements with a hash map.
2022-12-22 17:19:37 +01:00
J.Teeuwissen
1caafbc131
Feedback
2022-12-22 15:42:26 +01:00
J.Teeuwissen
5229edd742
Use hash instead of binary search
2022-12-22 14:08:41 +01:00
Folkert
4ef541395a
remove dbg lowlevel
2022-12-22 02:45:09 +01:00
Folkert
f76df8a356
make dbg transparent to refcounting
2022-12-22 01:03:03 +01:00
J Teeuwissen
dc65298f9d
Merge branch 'roc-lang:main' into main
2022-12-20 10:19:35 +01:00
Ayaz Hafiz
a96225e92e
Store specialized variable for use in dbg as fake symbol in lowlevel call
2022-12-14 17:00:37 -06:00
J.Teeuwissen
e3dcaa2141
typo
2022-12-14 14:02:09 +01:00
Ayaz Hafiz
00ff6dcad7
Print similar-layout procs when borrow fails to find one
2022-12-12 14:13:07 -06:00
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