mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 08:34:33 +00:00
feat: add the type def for Str.toNum
This commit is contained in:
parent
e63701c5d1
commit
3104406956
1 changed files with 10 additions and 1 deletions
|
@ -703,7 +703,16 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
|
|||
);
|
||||
|
||||
// toNum : Str -> Result (Num a) {}
|
||||
// TODO
|
||||
let invalid_str = SolvedType::TagUnion(
|
||||
vec![(TagName::Global("InvalidNumStr".into()), vec![])],
|
||||
Box::new(SolvedType::Wildcard),
|
||||
);
|
||||
|
||||
add_top_level_function_type!(
|
||||
Symbol::STR_TO_NUM,
|
||||
vec![str_type()],
|
||||
Box::new(result_type(flex(TVAR1), invalid_str))
|
||||
);
|
||||
|
||||
// List module
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue