mirror of
https://github.com/roc-lang/roc.git
synced 2024-11-11 16:51:53 +03:00
Fix hardcoded List.isEmpty type
This commit is contained in:
parent
7b03091414
commit
bac940e116
@ -371,18 +371,6 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
|
||||
|
||||
// List module
|
||||
|
||||
// isEmpty : List * -> Bool
|
||||
add_type(
|
||||
Symbol::LIST_IS_EMPTY,
|
||||
SolvedType::Func(
|
||||
vec![SolvedType::Apply(
|
||||
Symbol::LIST_LIST,
|
||||
vec![SolvedType::Wildcard],
|
||||
)],
|
||||
Box::new(bool_type()),
|
||||
),
|
||||
);
|
||||
|
||||
// get : List elem, Int -> Result elem [ IndexOutOfBounds ]*
|
||||
let index_out_of_bounds = SolvedType::TagUnion(
|
||||
vec![(TagName::Global("IndexOutOfBounds".into()), vec![])],
|
||||
@ -463,6 +451,12 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
|
||||
SolvedType::Func(vec![list_type(flex(TVAR1))], Box::new(int_type())),
|
||||
);
|
||||
|
||||
// isEmpty : List * -> Bool
|
||||
add_type(
|
||||
Symbol::LIST_IS_EMPTY,
|
||||
SolvedType::Func(vec![list_type(flex(TVAR1))], Box::new(bool_type())),
|
||||
);
|
||||
|
||||
// Map module
|
||||
|
||||
// empty : Map k v
|
||||
|
Loading…
Reference in New Issue
Block a user