Clarify some comments

This commit is contained in:
Richard Feldman 2020-09-21 21:26:56 -04:00
parent 2457042989
commit 9381207f61
2 changed files with 4 additions and 4 deletions

View File

@ -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())),

View File

@ -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))