Add listGetUnsafe to Dict.roc rather than exposing from list

This commit is contained in:
Ayaz Hafiz 2022-10-14 13:43:04 -05:00
parent 5a86f611fa
commit 12ecdab4c5
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
4 changed files with 24 additions and 16 deletions

View file

@ -70,6 +70,7 @@ macro_rules! map_symbol_to_lowlevel_and_arity {
// Below, we explicitly handle some exceptions to the pattern where a lowlevel maps
// directly to a symbol. If you are unsure if your lowlevel is an exception, assume
// that it isn't and just see if that works.
#[allow(unreachable_patterns)] // multiple symbols can map to one low-level
match lowlevel {
$(
LowLevel::$lowlevel => Symbol::$symbol,
@ -144,6 +145,8 @@ map_symbol_to_lowlevel_and_arity! {
ListSwap; LIST_SWAP; 3,
ListGetCapacity; LIST_CAPACITY; 1,
ListGetUnsafe; DICT_LIST_GET_UNSAFE; 2,
NumAdd; NUM_ADD; 2,
NumAddWrap; NUM_ADD_WRAP; 2,
NumAddChecked; NUM_ADD_CHECKED_LOWLEVEL; 2,