Merge branch 'trunk' of github.com:rtfeldman/roc into crates-folder

This commit is contained in:
Anton-4 2022-07-02 12:35:19 +02:00
commit b74fc3554b
No known key found for this signature in database
GPG key ID: C954D6E0F9C0ABFD
35 changed files with 359 additions and 1204 deletions

View file

@ -26,16 +26,10 @@ pub enum LowLevel {
ListLen,
ListWithCapacity,
ListGetUnsafe,
ListSingle,
ListRepeat,
ListReplaceUnsafe,
ListReverse,
ListConcat,
ListContains,
ListAppend,
ListPrepend,
ListJoin,
ListRange,
ListMap,
ListMap2,
ListMap3,
@ -51,8 +45,6 @@ pub enum LowLevel {
ListSublist,
ListDropAt,
ListSwap,
ListAny,
ListAll,
ListFindUnsafe,
ListIsUnique,
DictSize,
@ -146,8 +138,6 @@ macro_rules! higher_order {
| ListKeepOks
| ListKeepErrs
| ListSortWith
| ListAny
| ListAll
| ListFindUnsafe
| DictWalk
};
@ -178,8 +168,6 @@ impl LowLevel {
ListKeepOks => 1,
ListKeepErrs => 1,
ListSortWith => 1,
ListAny => 1,
ListAll => 1,
ListFindUnsafe => 1,
DictWalk => 2,
_ => unreachable!(),
@ -236,15 +224,9 @@ impl LowLevelWrapperType {
Symbol::LIST_LEN => CanBeReplacedBy(ListLen),
Symbol::LIST_GET => WrapperIsRequired,
Symbol::LIST_REPLACE => WrapperIsRequired,
Symbol::LIST_SINGLE => CanBeReplacedBy(ListSingle),
Symbol::LIST_REPEAT => CanBeReplacedBy(ListRepeat),
Symbol::LIST_REVERSE => CanBeReplacedBy(ListReverse),
Symbol::LIST_CONCAT => CanBeReplacedBy(ListConcat),
Symbol::LIST_CONTAINS => CanBeReplacedBy(ListContains),
Symbol::LIST_APPEND => CanBeReplacedBy(ListAppend),
Symbol::LIST_PREPEND => CanBeReplacedBy(ListPrepend),
Symbol::LIST_JOIN => CanBeReplacedBy(ListJoin),
Symbol::LIST_RANGE => CanBeReplacedBy(ListRange),
Symbol::LIST_MAP => WrapperIsRequired,
Symbol::LIST_MAP2 => WrapperIsRequired,
Symbol::LIST_MAP3 => WrapperIsRequired,

View file

@ -1254,6 +1254,7 @@ define_builtins! {
60 LIST_GET_UNSAFE: "getUnsafe"
61 LIST_REPLACE_UNSAFE: "replaceUnsafe"
62 LIST_WITH_CAPACITY: "withCapacity"
63 LIST_ITERATE: "iterate"
}
6 RESULT: "Result" => {
0 RESULT_RESULT: "Result" // the Result.Result type alias