mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
implemented Result.isErr
This commit is contained in:
parent
bb3a9c4138
commit
10eab4b785
4 changed files with 116 additions and 0 deletions
|
@ -1381,6 +1381,13 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
|
|||
Box::new(bool_type()),
|
||||
);
|
||||
|
||||
// isErr : Result * * -> bool
|
||||
add_top_level_function_type!(
|
||||
Symbol::RESULT_IS_ERR,
|
||||
vec![result_type(flex(TVAR1), flex(TVAR3))],
|
||||
Box::new(bool_type()),
|
||||
);
|
||||
|
||||
types
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue