mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
Temporarily disable List.get in favor of getUnsafe
This commit is contained in:
parent
52a3e0afb5
commit
1bee16decd
6 changed files with 141 additions and 142 deletions
|
@ -371,7 +371,20 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
|
|||
|
||||
// List module
|
||||
|
||||
// get : List elem, Int -> Result elem [ IndexOutOfBounds ]*
|
||||
// get : List elem, Int -> Result elem [ OutOfBounds ]*
|
||||
let index_out_of_bounds = SolvedType::TagUnion(
|
||||
vec![(TagName::Global("OutOfBounds".into()), vec![])],
|
||||
Box::new(SolvedType::Wildcard),
|
||||
);
|
||||
|
||||
add_type(
|
||||
Symbol::LIST_GET,
|
||||
SolvedType::Func(
|
||||
vec![list_type(flex(TVAR1)), int_type()],
|
||||
Box::new(result_type(flex(TVAR1), index_out_of_bounds)),
|
||||
),
|
||||
);
|
||||
|
||||
add_type(
|
||||
Symbol::LIST_GET_UNSAFE,
|
||||
SolvedType::Func(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue