mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
working AStar
This commit is contained in:
parent
9527434be8
commit
13b2c23c01
19 changed files with 578 additions and 81 deletions
|
@ -539,6 +539,12 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
|
|||
top_level_function(vec![int_type(flex(TVAR1))], Box::new(str_type())),
|
||||
);
|
||||
|
||||
// fromFloat : Float a -> Str
|
||||
add_type(
|
||||
Symbol::STR_FROM_FLOAT,
|
||||
top_level_function(vec![float_type(flex(TVAR1))], Box::new(str_type())),
|
||||
);
|
||||
|
||||
// List module
|
||||
|
||||
// get : List elem, Nat -> Result elem [ OutOfBounds ]*
|
||||
|
@ -989,6 +995,15 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
|
|||
),
|
||||
);
|
||||
|
||||
// withDefault : Result a x, a -> a
|
||||
add_type(
|
||||
Symbol::RESULT_WITH_DEFAULT,
|
||||
top_level_function(
|
||||
vec![result_type(flex(TVAR1), flex(TVAR3)), flex(TVAR1)],
|
||||
Box::new(flex(TVAR1)),
|
||||
),
|
||||
);
|
||||
|
||||
types
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue