mirror of
https://github.com/roc-lang/roc.git
synced 2025-11-25 05:33:14 +00:00
List.unreachable
This commit is contained in:
parent
543615292a
commit
506e374642
7 changed files with 36 additions and 0 deletions
|
|
@ -100,6 +100,7 @@ pub fn builtin_defs_map(symbol: Symbol, var_store: &mut VarStore) -> Option<Def>
|
|||
STR_TO_I16 => str_to_num,
|
||||
STR_TO_U8 => str_to_num,
|
||||
STR_TO_I8 => str_to_num,
|
||||
LIST_UNREACHABLE => roc_unreachable,
|
||||
LIST_LEN => list_len,
|
||||
LIST_WITH_CAPACITY => list_with_capacity,
|
||||
LIST_GET_UNSAFE => list_get_unsafe,
|
||||
|
|
@ -2475,6 +2476,11 @@ fn list_walk_until(symbol: Symbol, var_store: &mut VarStore) -> Def {
|
|||
lowlevel_3(symbol, LowLevel::ListWalkUntil, var_store)
|
||||
}
|
||||
|
||||
/// List.unreachable : [] -> a
|
||||
fn roc_unreachable(symbol: Symbol, var_store: &mut VarStore) -> Def {
|
||||
lowlevel_1(symbol, LowLevel::Unreachable, var_store)
|
||||
}
|
||||
|
||||
/// List.map : List before, (before -> after) -> List after
|
||||
fn list_map(symbol: Symbol, var_store: &mut VarStore) -> Def {
|
||||
lowlevel_2(symbol, LowLevel::ListMap, var_store)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue