mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 15:51:12 +00:00
Int Abs
This commit is contained in:
parent
41af22a2ac
commit
1d1f620090
7 changed files with 80 additions and 7 deletions
|
@ -342,6 +342,12 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
|
|||
|
||||
// Int module
|
||||
|
||||
// isLt or (<) : Num a, Num a -> Bool
|
||||
add_type(
|
||||
Symbol::INT_LT,
|
||||
unique_function(vec![int_type(UVAR1), int_type(UVAR2)], bool_type(UVAR3)),
|
||||
);
|
||||
|
||||
// equals or (==) : Int, Int -> Bool
|
||||
add_type(
|
||||
Symbol::INT_EQ_I64,
|
||||
|
@ -354,7 +360,7 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
|
|||
unique_function(vec![int_type(UVAR1), int_type(UVAR2)], bool_type(UVAR3)),
|
||||
);
|
||||
|
||||
// abs :: Int -> Int
|
||||
// abs : Int -> Int
|
||||
add_type(
|
||||
Symbol::INT_ABS,
|
||||
unique_function(vec![int_type(UVAR1)], int_type(UVAR2)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue