List.join builtin and unification

This commit is contained in:
Chad Stearns 2020-08-01 22:28:09 -04:00
parent 6dd6afbeac
commit a9ab550c10
6 changed files with 49 additions and 0 deletions

View file

@ -528,6 +528,15 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
),
);
// join : List (List elem) -> List elem
add_type(
Symbol::LIST_JOIN,
SolvedType::Func(
vec![list_type(list_type(flex(TVAR1)))],
Box::new(list_type(flex(TVAR1))),
),
);
// single : a -> List a
add_type(
Symbol::LIST_SINGLE,