mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
Rename Category::Float to Category::Frac
This commit is contained in:
parent
e389b23e4b
commit
3972664e48
6 changed files with 10 additions and 10 deletions
|
@ -66,7 +66,7 @@ impl Constraints {
|
|||
Category::StrInterpolation,
|
||||
Category::If,
|
||||
Category::When,
|
||||
Category::Float,
|
||||
Category::Frac,
|
||||
Category::Int,
|
||||
Category::Num,
|
||||
Category::List,
|
||||
|
@ -199,7 +199,7 @@ impl Constraints {
|
|||
Category::StrInterpolation => Self::CATEGORY_STRINTERPOLATION,
|
||||
Category::If => Self::CATEGORY_IF,
|
||||
Category::When => Self::CATEGORY_WHEN,
|
||||
Category::Float => Self::CATEGORY_FLOAT,
|
||||
Category::Frac => Self::CATEGORY_FLOAT,
|
||||
Category::Int => Self::CATEGORY_INT,
|
||||
Category::Num => Self::CATEGORY_NUM,
|
||||
Category::List => Self::CATEGORY_LIST,
|
||||
|
|
|
@ -243,7 +243,7 @@ impl Expr {
|
|||
match self {
|
||||
Self::Num(..) => Category::Num,
|
||||
Self::Int(..) => Category::Int,
|
||||
Self::Float(..) => Category::Float,
|
||||
Self::Float(..) => Category::Frac,
|
||||
Self::Str(..) => Category::Str,
|
||||
Self::SingleQuote(..) => Category::Character,
|
||||
Self::List { .. } => Category::List,
|
||||
|
|
|
@ -118,17 +118,17 @@ pub fn float_literal(
|
|||
precision_var,
|
||||
bound,
|
||||
region,
|
||||
Category::Float,
|
||||
Category::Frac,
|
||||
);
|
||||
|
||||
constrs.extend([
|
||||
constraints.equal_types(
|
||||
num_type.clone(),
|
||||
ForReason(reason, num_float(Type::Variable(precision_var)), region),
|
||||
Category::Float,
|
||||
Category::Frac,
|
||||
region,
|
||||
),
|
||||
constraints.equal_types(num_type, expected, Category::Float, region),
|
||||
constraints.equal_types(num_type, expected, Category::Frac, region),
|
||||
]);
|
||||
|
||||
let and_constraint = constraints.and_constraint(constrs);
|
||||
|
|
|
@ -289,7 +289,7 @@ pub fn constrain_pattern(
|
|||
num_precision_var,
|
||||
bound,
|
||||
region,
|
||||
Category::Float,
|
||||
Category::Frac,
|
||||
);
|
||||
|
||||
// Link the free num var with the float var and our expectation.
|
||||
|
@ -298,7 +298,7 @@ pub fn constrain_pattern(
|
|||
state.constraints.push(constraints.equal_types(
|
||||
num_type.clone(), // TODO check me if something breaks!
|
||||
Expected::NoExpectation(float_type),
|
||||
Category::Float,
|
||||
Category::Frac,
|
||||
region,
|
||||
));
|
||||
|
||||
|
|
|
@ -1980,7 +1980,7 @@ pub enum Category {
|
|||
When,
|
||||
|
||||
// types
|
||||
Float,
|
||||
Frac,
|
||||
Int,
|
||||
Num,
|
||||
List,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue