mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 14:54:47 +00:00
feat(Num): rename Float to F64
This commit is contained in:
parent
301ee85219
commit
f7bd803509
19 changed files with 140 additions and 144 deletions
|
@ -70,7 +70,7 @@ pub fn aliases() -> MutMap<Symbol, BuiltinAlias> {
|
|||
|
||||
// Float : Num FloatingPoint
|
||||
add_alias(
|
||||
Symbol::NUM_FLOAT,
|
||||
Symbol::NUM_F64,
|
||||
BuiltinAlias {
|
||||
region: Region::zero(),
|
||||
vars: Vec::new(),
|
||||
|
@ -143,11 +143,7 @@ fn floatingpoint_alias_content() -> SolvedType {
|
|||
|
||||
#[inline(always)]
|
||||
pub fn float_type() -> SolvedType {
|
||||
SolvedType::Alias(
|
||||
Symbol::NUM_FLOAT,
|
||||
Vec::new(),
|
||||
Box::new(float_alias_content()),
|
||||
)
|
||||
SolvedType::Alias(Symbol::NUM_F64, Vec::new(), Box::new(float_alias_content()))
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
|
|
|
@ -331,7 +331,7 @@ fn write_content(env: &Env, content: Content, subs: &Subs, buf: &mut String, par
|
|||
match &content {
|
||||
Alias(nested, _, _) => match *nested {
|
||||
Symbol::NUM_INTEGER => buf.push_str("Int"),
|
||||
Symbol::NUM_FLOATINGPOINT => buf.push_str("Float"),
|
||||
Symbol::NUM_FLOATINGPOINT => buf.push_str("F64"),
|
||||
|
||||
_ => write_parens!(write_parens, buf, {
|
||||
buf.push_str("Num ");
|
||||
|
@ -344,7 +344,7 @@ fn write_content(env: &Env, content: Content, subs: &Subs, buf: &mut String, par
|
|||
match &attr_content {
|
||||
Alias(nested, _, _) => match *nested {
|
||||
Symbol::NUM_INTEGER => buf.push_str("Int"),
|
||||
Symbol::NUM_FLOATINGPOINT => buf.push_str("Float"),
|
||||
Symbol::NUM_FLOATINGPOINT => buf.push_str("F64"),
|
||||
_ => write_parens!(write_parens, buf, {
|
||||
buf.push_str("Num ");
|
||||
write_content(env, content, subs, buf, parens);
|
||||
|
@ -757,7 +757,7 @@ fn write_apply(
|
|||
buf.push_str("Int");
|
||||
}
|
||||
Symbol::NUM_FLOATINGPOINT if nested_args.is_empty() => {
|
||||
buf.push_str("Float");
|
||||
buf.push_str("F64");
|
||||
}
|
||||
Symbol::ATTR_ATTR => match nested_args
|
||||
.get(1)
|
||||
|
@ -771,7 +771,7 @@ fn write_apply(
|
|||
buf.push_str("Int");
|
||||
}
|
||||
Symbol::NUM_FLOATINGPOINT if double_nested_args.is_empty() => {
|
||||
buf.push_str("Float");
|
||||
buf.push_str("F64");
|
||||
}
|
||||
_ => default_case(subs, arg_content),
|
||||
},
|
||||
|
|
|
@ -1160,7 +1160,7 @@ fn write_error_type_help(
|
|||
buf.push_str("Int");
|
||||
}
|
||||
Type(Symbol::NUM_FLOATINGPOINT, _) => {
|
||||
buf.push_str("Float");
|
||||
buf.push_str("F64");
|
||||
}
|
||||
other => {
|
||||
let write_parens = parens == Parens::InTypeParam;
|
||||
|
@ -1278,7 +1278,7 @@ fn write_debug_error_type_help(error_type: ErrorType, buf: &mut String, parens:
|
|||
buf.push_str("Int");
|
||||
}
|
||||
Type(Symbol::NUM_FLOATINGPOINT, _) => {
|
||||
buf.push_str("Float");
|
||||
buf.push_str("F64");
|
||||
}
|
||||
other => {
|
||||
let write_parens = parens == Parens::InTypeParam;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue