Commit graph

2701 commits

Author SHA1 Message Date
Ayaz Hafiz
54e977be2d
Constrain function type on closure type, not signature 2022-10-12 16:37:49 -05:00
Ayaz Hafiz
8310230f78
Add gen test for custom Eq 2022-10-12 16:37:49 -05:00
Ayaz Hafiz
0045c16b3e
Improve notes on underivable abilities 2022-10-12 16:37:49 -05:00
Ayaz Hafiz
b587bcf0c2
Implement obligation checking for the Eq ability
Every type can have `Eq.isEq` derived for it, as long as

- it does not transitively contain a function
- it does not transitively contain a floating point value
- it does not transitively contain an opaque type that does not support
  `Eq`
2022-10-12 16:37:49 -05:00
Ayaz Hafiz
5931dd5fc2
Check in test derive for eq 2022-10-12 16:37:48 -05:00
Ayaz Hafiz
4c30e4c4bb
Add derive-key implementation for IsEq 2022-10-12 16:37:48 -05:00
Ayaz Hafiz
16d12a51c2
Add Eq to the standard library 2022-10-12 16:37:48 -05:00
Ayaz
b2e7fd91ab
Merge pull request #4302 from roc-lang/serialize-ability-store
Serialize the abilities store and solved implementations for builtins
2022-10-12 16:37:16 -05:00
Prajwal S N
a3e6345257
builtin(list): add List.countIf
Closes #4174

Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2022-10-13 00:45:13 +05:30
Ayaz Hafiz
53514141f6
Layer thunk assignment over def body instead of returning immediately 2022-10-12 10:36:57 -05:00
Ayaz Hafiz
a68c63f1d1
Correctly destructure patterns that are assigned to a thunk'd value
Closes #4309
2022-10-12 09:23:48 -05:00
Anton-4
795bd3ff09
Merge pull request #4310 from cjduncana/fix-article
Fix typo in error
2022-10-12 16:12:33 +02:00
Christopher Duncan
d7cdcfc66b
Fix typo in error 2022-10-12 08:26:33 -04:00
Anton-4
fb926c9884
Merge pull request #4306 from jmakhack/newline-repl-tip
Add how to newline repl tips at start-up
2022-10-12 12:47:16 +02:00
Brian Carroll
3ce387b3e5
Fix benchmark host for 32-bit targets 2022-10-12 08:09:14 +01:00
Anton-4
54d0bc43b2
wasm 32 cli run fixes, added to ci tests 2022-10-12 07:43:47 +01:00
Brendan Hansknecht
8f8e6bebeb
Merge pull request #4295 from roc-lang/str-growth
Add capacity growth to RocStr
2022-10-12 06:41:14 +00:00
Josh Mak
20fcacbcd6
Add how to newline repl tips at start-up 2022-10-11 18:25:08 -07:00
Christopher Duncan
e086187f3c
Repair links in Markdown
This resolves #3832
2022-10-11 18:36:15 -04:00
Ayaz Hafiz
a9c79db5db
Allow complicated type 2022-10-11 10:49:24 -05:00
Ayaz Hafiz
76ce025faa
Turn on type caching for Encode, Decode, Hash 2022-10-11 10:48:25 -05:00
Ayaz Hafiz
7e79ff55f1
Serialize abilities store and solved implementations with subs 2022-10-11 10:31:21 -05:00
Brendan Hansknecht
e551e59c1c
refactor string reallocation 2022-10-11 07:56:34 -07:00
Ayaz Hafiz
46eb427393
Use roc_serialize in serializing abilities store, and add tests 2022-10-11 09:41:47 -05:00
Ayaz Hafiz
46aab8ad8c
Use roc_serialize for subs serialization 2022-10-11 09:19:25 -05:00
Ayaz Hafiz
ad10bf07c5
Allow serializing into a VecSet via Vec 2022-10-11 09:15:15 -05:00
Ayaz Hafiz
e880c45c8b
Implement serde for VecMap 2022-10-11 09:01:45 -05:00
Ayaz Hafiz
a5dbdf0b02
Add a roc_serialize crate for serialization utilities 2022-10-11 08:52:19 -05:00
Anton-4
46920d3c08
simplify format
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2022-10-11 15:47:09 +02:00
Christopher Duncan
5ccd3c884d
Fix prefetch links in the Standard Library page 2022-10-11 08:00:11 -04:00
Luca Cervello
c39103d6d0
chore: replace panic! with internal_error! 2022-10-11 11:52:08 +02:00
Brian Carroll
36a8a2a99f
Merge pull request #4271 from roc-lang/s-for-search
Search docs with S instead of /
2022-10-11 08:30:50 +01:00
Brendan Hansknecht
ac33fd3237
fix wasm test 2022-10-10 23:18:06 -07:00
Brendan Hansknecht
96b5d365b2
Add capacity growth to RocStr
Also, cleans up the alloc and realloc api for both list and str.
Updates Str.reserve to match List.reserve
2022-10-10 22:24:55 -07:00
Ayaz Hafiz
80e0690a70
Resolve merge conflict regarding tag name slices 2022-10-11 00:00:41 -05:00
Brendan Hansknecht
dfcb72602d
Merge pull request #4287 from roc-lang/remove-old-result
[Easy Review] Remove RocResult from utils.zig
2022-10-11 03:54:12 +00:00
Ayaz
83b64c4fb3
Merge pull request #4209 from roc-lang/impl-tag-discriminant
Derive `Hash` implementations for tag unions
2022-10-10 22:23:05 -05:00
Ayaz Hafiz
9131a55a72
First pass at serializing the abilities store 2022-10-10 19:32:17 -05:00
Ayaz Hafiz
781d1a2642
Serialize uls_of_var in subs cache 2022-10-10 16:42:04 -05:00
Brendan Hansknecht
fdafac4323
Remove RocResult from utils.zig
It is implemented wrong and not used anywhere
2022-10-10 08:25:59 -07:00
Ayaz
b84c05fad9
Merge pull request #4276 from roc-lang/dependabot/cargo/once_cell-1.15.0
Bump once_cell from 1.14.0 to 1.15.0
2022-10-10 10:08:50 -05:00
Ayaz
3d17307bde
Merge pull request #4275 from roc-lang/surgical-error-msg
Give an error message when the surgical linker #3609
2022-10-10 10:08:33 -05:00
dependabot[bot]
1a9323ecdc
Bump libc from 0.2.133 to 0.2.135
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.133 to 0.2.135.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.133...0.2.135)

---
updated-dependencies:
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-10 13:00:20 +00:00
Richard Feldman
860d8b41f1
Merge pull request #4273 from cjduncana/dict-update
Add the `update` function to the `Dict` module
2022-10-10 02:37:42 -07:00
dependabot[bot]
7a2a0e12aa
Bump once_cell from 1.14.0 to 1.15.0
Bumps [once_cell](https://github.com/matklad/once_cell) from 1.14.0 to 1.15.0.
- [Release notes](https://github.com/matklad/once_cell/releases)
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md)
- [Commits](https://github.com/matklad/once_cell/compare/v1.14.0...v1.15.0)

---
updated-dependencies:
- dependency-name: once_cell
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-10 05:26:09 +00:00
Christopher Duncan
96e12aa790
Add the update function to the Dict module
This resolves #4239
2022-10-09 20:21:21 -04:00
Brendan Hansknecht
3cf4459ea6
filter out debug and eh relocatoins 2022-10-09 15:48:23 -07:00
Richard Feldman
07ceabc9aa
Merge pull request #4245 from snprajwal/str-withprefix
builtin(str): add Str.withPrefix
2022-10-09 11:53:24 -07:00
Brendan Hansknecht
b306c9a76b
give an error message when the surgical linker would fail with know issue #3609 2022-10-09 11:39:10 -07:00
Jan Van Bruggen
7125ccb7b5
Merge pull request #4269 from roc-lang/v0.0.1_everywhere
De-bump all v0.1.0 Roc packages to v0.0.1
2022-10-09 12:27:24 -06:00