mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
Merge remote-tracking branch 'origin/trunk' into builtins-in-roc
This commit is contained in:
commit
adf4ad22a5
90 changed files with 3197 additions and 2191 deletions
|
@ -1056,6 +1056,19 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
|
|||
Box::new(result_type(flex(TVAR1), list_was_empty.clone())),
|
||||
);
|
||||
|
||||
// replace : List elem, Nat, elem -> { list: List elem, value: elem }
|
||||
add_top_level_function_type!(
|
||||
Symbol::LIST_REPLACE,
|
||||
vec![list_type(flex(TVAR1)), nat_type(), flex(TVAR1)],
|
||||
Box::new(SolvedType::Record {
|
||||
fields: vec![
|
||||
("list".into(), RecordField::Required(list_type(flex(TVAR1)))),
|
||||
("value".into(), RecordField::Required(flex(TVAR1))),
|
||||
],
|
||||
ext: Box::new(SolvedType::EmptyRecord),
|
||||
}),
|
||||
);
|
||||
|
||||
// set : List elem, Nat, elem -> List elem
|
||||
add_top_level_function_type!(
|
||||
Symbol::LIST_SET,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue