mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 08:11:12 +00:00
unique and std work, check if delimiter is longer than str
This commit is contained in:
parent
5fe6eefa97
commit
43960cf1c6
6 changed files with 108 additions and 3 deletions
|
@ -1105,6 +1105,24 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
|
|||
|
||||
// Str module
|
||||
|
||||
// Str.split :
|
||||
// Attr * Str,
|
||||
// Attr * Str
|
||||
// -> Attr * (List (Attr * Str))
|
||||
add_type(Symbol::STR_SPLIT, {
|
||||
let_tvars! { star1, star2, star3, star4 };
|
||||
unique_function(
|
||||
vec![str_type(star1), str_type(star2)],
|
||||
SolvedType::Apply(
|
||||
Symbol::ATTR_ATTR,
|
||||
vec![
|
||||
flex(star3),
|
||||
SolvedType::Apply(Symbol::LIST_LIST, vec![str_type(star4)]),
|
||||
],
|
||||
),
|
||||
)
|
||||
});
|
||||
|
||||
// isEmpty : Attr * Str -> Attr * Bool
|
||||
add_type(Symbol::STR_IS_EMPTY, {
|
||||
let_tvars! { star1, star2 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue