mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +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
|
@ -285,6 +285,12 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
|
|||
SolvedType::Func(vec![int_type(), int_type()], Box::new(bool_type())),
|
||||
);
|
||||
|
||||
// abs : Int -> Int
|
||||
add_type(
|
||||
Symbol::INT_ABS,
|
||||
SolvedType::Func(vec![int_type()], Box::new(int_type())),
|
||||
);
|
||||
|
||||
// highest : Int
|
||||
add_type(Symbol::INT_HIGHEST, int_type());
|
||||
|
||||
|
@ -336,6 +342,12 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
|
|||
SolvedType::Func(vec![float_type()], Box::new(int_type())),
|
||||
);
|
||||
|
||||
// abs : Float -> Float
|
||||
add_type(
|
||||
Symbol::FLOAT_ABS,
|
||||
SolvedType::Func(vec![float_type()], Box::new(float_type())),
|
||||
);
|
||||
|
||||
// highest : Float
|
||||
add_type(Symbol::FLOAT_HIGHEST, float_type());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue