List.single implementation

This commit is contained in:
Chad Stearns 2020-06-03 18:56:23 -04:00
parent d79f1af126
commit 97cb4a737e
5 changed files with 109 additions and 1 deletions

View file

@ -507,6 +507,12 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
),
);
// single : a -> List a
add_type(
Symbol::LIST_SINGLE,
SolvedType::Func(vec![flex(TVAR1)], Box::new(list_type(flex(TVAR1)))),
);
// len : List * -> Int
add_type(
Symbol::LIST_LEN,