mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 08:34:33 +00:00
feat(builtins): Num.acos : Float -> Float
This commit is contained in:
parent
00445b3bc6
commit
4da2d7f101
9 changed files with 46 additions and 2 deletions
|
@ -17,6 +17,7 @@ pub fn get_bytes() -> Vec<u8> {
|
|||
buffer
|
||||
}
|
||||
|
||||
pub const MATH_ACOS: &str = "roc_builtins.math.acos";
|
||||
pub const MATH_ATAN: &str = "roc_builtins.math.atan";
|
||||
pub const MATH_IS_FINITE: &str = "roc_builtins.math.is_finite";
|
||||
pub const MATH_POW_INT: &str = "roc_builtins.math.pow_int";
|
||||
|
|
|
@ -350,6 +350,12 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
|
|||
top_level_function(vec![float_type()], Box::new(float_type())),
|
||||
);
|
||||
|
||||
// acos : Float -> Float
|
||||
add_type(
|
||||
Symbol::NUM_ACOS,
|
||||
top_level_function(vec![float_type()], Box::new(float_type())),
|
||||
);
|
||||
|
||||
// Bool module
|
||||
|
||||
// and : Bool, Bool -> Bool
|
||||
|
|
|
@ -375,6 +375,12 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
|
|||
unique_function(vec![float_type(star1)], float_type(star2))
|
||||
});
|
||||
|
||||
// acos : Float -> Float
|
||||
add_type(Symbol::NUM_ACOS, {
|
||||
let_tvars! { star1, star2 };
|
||||
unique_function(vec![float_type(star1)], float_type(star2))
|
||||
});
|
||||
|
||||
// Bool module
|
||||
|
||||
// isEq or (==) : Attr * a, Attr * a -> Attr * Bool
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue