Merge trunk

This commit is contained in:
Richard Feldman 2020-06-29 19:38:28 -04:00
parent baa3debae2
commit 8c96d12661
26 changed files with 2600 additions and 1093 deletions

View file

@ -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,