faldor20
23dd23c337
update builtin comments
2024-03-12 00:39:49 +10:00
Richard Feldman
77a10986d6
Update Set to no longer use Nat
2024-01-26 16:05:57 -05:00
Brendan Hansknecht
b39d604745
Dict follow up and addition of releaseExcessCapacity
2023-12-10 00:06:58 -08:00
Brendan Hansknecht
51ec4311b5
Swap Dict implementation to ankerl dense unordered
...
ankerl::dense_unordered is a very fast hash map that is built to be an index map.
This enables extra optimizations compared to just wrapping a regular hash map.
As such, I think this map is very well suited for our index map impl in Roc.
I also think this dictionary implementation is simpler overall.
On top of that, this removes the need for SIMD instructions for peak performance.
Benchmarks of the C++ version and other C++ hash maps are here: https://martin.ankerl.com/2022/08/27/hashmap-bench-01/
Though this has clear bias of being written by the author of ankerl::dense_unordered,
the results all look correct and the benchmarks thorough.
2023-12-09 18:11:22 -08:00
Brendan Hansknecht
f31a4070e4
implement Dict.withCapacity and improve Dict.fromList
2023-12-05 12:37:11 -08:00
LoipesMas
00839e12b5
Run roc format
2023-12-05 00:24:08 +01:00
LoipesMas
83ac8209ae
Add Dict.keepIf, Dict.dropIf, Set.keepIf, Set.dropIf
2023-12-04 23:38:51 +01:00
Brendan Hansknecht
9b181e1b3f
add inspect implementation for dict and set
2023-11-28 16:40:42 -08:00
Richard Feldman
c416e029a3
Remove some Dict and Set ability constraints
2023-08-11 21:19:36 -04:00
Richard Feldman
2da41be29f
Merge remote-tracking branch 'origin/main' into abilities-syntax
2023-08-10 20:36:01 -04:00
Kiryl Dziamura
1bb3c3d1dd
Make has
have 4 identation spaces
2023-07-04 11:24:40 +02:00
Richard Feldman
ed9d9b12f5
Add some missing Dict and Set functions
...
Also remove some unnecessary Hash and Eq restrictions
2023-06-27 11:50:58 -04:00
Bryce Miller
cb08225bf0
|
-> where
2023-06-05 20:19:00 -04:00
Bryce Miller
35a27daecf
formatting
2023-05-30 07:32:29 -04:00
Bryce Miller
98338f6e20
has -> implements
2023-05-29 08:35:51 -04:00
Bryce Miller
ffa622e065
Merge branch 'main' into abilities-syntax
...
Signed-off-by: Bryce Miller <sandprickle@users.noreply.github.com>
2023-05-29 13:42:36 +02:00
Ayaz Hafiz
d5f8af8021
Turn set test back on
2023-05-24 14:13:40 -05:00
Brendan Hansknecht
4cac15eb2b
remove stale comment
2023-05-24 10:48:40 -07:00
Brendan Hansknecht
877be563ba
add Hash and Eq to Dict and Set
2023-05-24 10:38:47 -07:00
Bryce Miller
44d3396508
builtin opaque type abilites has -> implements
2023-05-20 19:47:17 -04:00
Bryce Miller
b1d592ec37
has clause -> implements clause
2023-05-20 07:15:30 -04:00
Luke Boswell
ca2158edbb
simplify Set examples
2023-03-15 18:12:17 +11:00
Luke Boswell
5dde76c4ba
modify examples
2023-03-15 18:09:59 +11:00
Luke Boswell
d2bb434092
roc format
2023-03-14 18:36:12 +11:00
Luke Boswell
213111ca55
minor doc fixes, add docs for Set
2023-03-14 18:33:59 +11:00
Ayaz Hafiz
b8712bcb30
Weaken records in let-bindings
...
This change also means we must update the interface of `Dict.empty` and
`Set.empty` from
```
Dict.empty : Dict k v
```
to
```
Dict.empty : {} -> Dict k v
```
2023-01-14 15:33:51 +01:00
Brendan Hansknecht
b4b18cda5a
fix formatting
2022-12-03 13:17:35 -08:00
Brendan Hansknecht
4befccc6b4
expand Set test cases
2022-12-03 13:17:35 -08:00
Brendan Hansknecht
cad7d8b4e9
add walkUntil and use it to implement set equality
2022-12-03 13:17:35 -08:00
Brendan Hansknecht
28835d5bf3
some bug fixes
2022-12-03 13:17:34 -08:00
Brendan Hansknecht
4fc0dd9dd9
add a some tests and bug fixes
2022-12-03 13:17:34 -08:00
Brendan Hansknecht
02824e92fe
add Set implementation
2022-12-03 13:17:34 -08:00
Ayaz Hafiz
89def77f01
Use derived Eq impl for Dict and Set
2022-10-23 20:48:07 -05:00
Ayaz Hafiz
a256947a9f
Move Eq to Bool
2022-10-12 16:37:51 -05:00
Ayaz Hafiz
c618ced743
Replace Bool.isEq
with Eq.isEq
2022-10-12 16:37:49 -05:00
Ayaz Hafiz
5416eb7cbf
List dependencies in the stdlib explicitly rather than hard-coding
2022-10-05 18:53:49 -05:00
Richard Feldman
0f179272d9
Add some Set builtin tests
2022-08-15 13:05:32 -04:00
Richard Feldman
f575807834
Merge remote-tracking branch 'origin/trunk' into outdent-infix
2022-07-16 16:08:36 -04:00
Richard Feldman
7ed35eca50
roc format builtins
2022-07-13 23:16:09 -04:00
Folkert
79f8ae4e69
make Set/Dict mostly work
2022-07-13 11:15:57 +02:00
Folkert
66c0b7d9fd
formatting
2022-07-13 01:00:27 +02:00
Folkert
f9d8e01561
implement Dict/Set completely in roc
2022-07-13 00:35:20 +02:00
Folkert
c3914883be
format our roc code
2022-07-08 15:00:10 +02:00
Folkert
41768bfa97
new approach for defining our builtins
2022-07-08 13:46:34 +02:00
Richard Feldman
7e12171b76
roc format builtins
2022-07-06 14:00:40 -04:00
Anton-4
eee85fa45d
moved all crates into seperate folder + related path fixes
2022-07-01 17:37:43 +02:00