mirror of
https://github.com/roc-lang/roc.git
synced 2024-11-13 09:49:11 +03:00
Clarify some comments
This commit is contained in:
parent
2457042989
commit
9381207f61
@ -187,7 +187,7 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
|
||||
),
|
||||
);
|
||||
|
||||
// addChecked or (+) : Num a, Num a -> Result (Num a) [ IntOverflow ]*
|
||||
// addChecked : Num a, Num a -> Result (Num a) [ IntOverflow ]*
|
||||
let overflow = SolvedType::TagUnion(
|
||||
vec![(TagName::Global("Overflow".into()), vec![])],
|
||||
Box::new(SolvedType::Wildcard),
|
||||
@ -201,7 +201,7 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
|
||||
),
|
||||
);
|
||||
|
||||
// addWrap or (+) : Int, Int -> Int
|
||||
// addWrap : Int, Int -> Int
|
||||
add_type(
|
||||
Symbol::NUM_ADD_WRAP,
|
||||
SolvedType::Func(vec![int_type(), int_type()], Box::new(int_type())),
|
||||
|
@ -274,7 +274,7 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
|
||||
unique_function(vec![num_type(u, num), num_type(v, num)], num_type(w, num))
|
||||
});
|
||||
|
||||
// addChecked or (+) : Num a, Num a -> Result (Num a) [ IntOverflow ]*
|
||||
// addChecked : Num a, Num a -> Result (Num a) [ IntOverflow ]*
|
||||
let overflow = SolvedType::TagUnion(
|
||||
vec![(TagName::Global("Overflow".into()), vec![])],
|
||||
Box::new(SolvedType::Wildcard),
|
||||
@ -288,7 +288,7 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
|
||||
)
|
||||
});
|
||||
|
||||
// addWrap or (+) : Int, Int -> Int
|
||||
// addWrap : Int, Int -> Int
|
||||
add_type(Symbol::NUM_ADD_WRAP, {
|
||||
let_tvars! { u, v, w };
|
||||
unique_function(vec![int_type(u), int_type(v)], int_type(w))
|
||||
|
Loading…
Reference in New Issue
Block a user