mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 15:51:12 +00:00
FLOAT_ABS test, and NUM_ABS generally, but not implemented
This commit is contained in:
parent
be5641e35a
commit
8e8412bf94
6 changed files with 45 additions and 2 deletions
|
@ -354,6 +354,12 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
|
|||
unique_function(vec![int_type(UVAR1), int_type(UVAR2)], bool_type(UVAR3)),
|
||||
);
|
||||
|
||||
// abs :: Int -> Int
|
||||
add_type(
|
||||
Symbol::INT_ABS,
|
||||
unique_function(vec![int_type(UVAR1)], int_type(UVAR2)),
|
||||
);
|
||||
|
||||
// highest : Int
|
||||
add_type(Symbol::INT_HIGHEST, int_type(UVAR1));
|
||||
|
||||
|
@ -418,6 +424,12 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
|
|||
unique_function(vec![float_type(UVAR1)], int_type(UVAR2)),
|
||||
);
|
||||
|
||||
// abs : Float -> Float
|
||||
add_type(
|
||||
Symbol::FLOAT_ABS,
|
||||
unique_function(vec![float_type(UVAR1)], float_type(UVAR2)),
|
||||
);
|
||||
|
||||
// highest : Float
|
||||
add_type(Symbol::FLOAT_HIGHEST, float_type(UVAR1));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue