mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
Merge trunk
This commit is contained in:
parent
baa3debae2
commit
8c96d12661
26 changed files with 2600 additions and 1093 deletions
|
@ -512,7 +512,7 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
|
|||
),
|
||||
);
|
||||
|
||||
// push : List a -> a -> List a
|
||||
// push : List elem -> elem -> List elem
|
||||
add_type(
|
||||
Symbol::LIST_PUSH,
|
||||
SolvedType::Func(
|
||||
|
@ -527,6 +527,15 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
|
|||
SolvedType::Func(vec![flex(TVAR1)], Box::new(list_type(flex(TVAR1)))),
|
||||
);
|
||||
|
||||
// repeat : Int, elem -> List elem
|
||||
add_type(
|
||||
Symbol::LIST_REPEAT,
|
||||
SolvedType::Func(
|
||||
vec![int_type(), flex(TVAR1)],
|
||||
Box::new(list_type(flex(TVAR1))),
|
||||
),
|
||||
);
|
||||
|
||||
// len : List * -> Int
|
||||
add_type(
|
||||
Symbol::LIST_LEN,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue