Complete implementation of List.keepIf, that is currently not passing tests

This commit is contained in:
Chad Stearns 2020-08-30 21:29:14 -04:00
parent 8b31419b2c
commit b02f8af37e
3 changed files with 181 additions and 6 deletions

View file

@ -787,14 +787,14 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
// , Attr Shared (a -> Attr * Bool)
// -> Attr * (List b)
add_type(Symbol::LIST_KEEP_IF, {
let_tvars! { a, b, star1, star2, star3 };
let_tvars! { a, star1, star2, star3 };
unique_function(
vec![
list_type(star1, a),
shared(SolvedType::Func(vec![flex(a)], Box::new(bool_type(star2)))),
],
list_type(star3, b),
list_type(star3, a),
)
});