mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
Merge remote-tracking branch 'origin/trunk' into small-str
This commit is contained in:
commit
5d3645350d
33 changed files with 2597 additions and 902 deletions
|
@ -412,6 +412,18 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
|
|||
// minFloat : Float
|
||||
add_type(Symbol::NUM_MIN_FLOAT, float_type());
|
||||
|
||||
// pow : Float, Float -> Float
|
||||
add_type(
|
||||
Symbol::NUM_POW,
|
||||
SolvedType::Func(vec![float_type(), float_type()], Box::new(float_type())),
|
||||
);
|
||||
|
||||
// ceiling : Float -> Int
|
||||
add_type(
|
||||
Symbol::NUM_CEILING,
|
||||
SolvedType::Func(vec![float_type()], Box::new(int_type())),
|
||||
);
|
||||
|
||||
// Bool module
|
||||
|
||||
// and : Bool, Bool -> Bool
|
||||
|
|
|
@ -448,6 +448,21 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
|
|||
unique_function(vec![num_type(star1, a)], bool_type(star2))
|
||||
});
|
||||
|
||||
// pow : Float, Float -> Float
|
||||
add_type(Symbol::NUM_POW, {
|
||||
let_tvars! { star1, star2, star3 };
|
||||
unique_function(
|
||||
vec![float_type(star1), float_type(star2)],
|
||||
float_type(star3),
|
||||
)
|
||||
});
|
||||
|
||||
// ceiling : Float -> Int
|
||||
add_type(Symbol::NUM_CEILING, {
|
||||
let_tvars! { star1, star2 };
|
||||
unique_function(vec![float_type(star1)], int_type(star2))
|
||||
});
|
||||
|
||||
// Bool module
|
||||
|
||||
// isEq or (==) : Attr * a, Attr * a -> Attr * Bool
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue