mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
Rename error to LogNeedsPositive
This commit is contained in:
parent
0190bbb06d
commit
cd59af1f9a
2 changed files with 5 additions and 5 deletions
|
@ -431,8 +431,8 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
|
|||
);
|
||||
|
||||
// log : Float a -> Float a
|
||||
let log_of_negative = SolvedType::TagUnion(
|
||||
vec![(TagName::Global("LogOfNegative".into()), vec![])],
|
||||
let log_needs_positive = SolvedType::TagUnion(
|
||||
vec![(TagName::Global("LogNeedsPositive".into()), vec![])],
|
||||
Box::new(SolvedType::Wildcard),
|
||||
);
|
||||
|
||||
|
@ -440,7 +440,7 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
|
|||
Symbol::NUM_LOG,
|
||||
top_level_function(
|
||||
vec![float_type(flex(TVAR1))],
|
||||
Box::new(result_type(float_type(flex(TVAR1)), log_of_negative)),
|
||||
Box::new(result_type(float_type(flex(TVAR1)), log_needs_positive)),
|
||||
),
|
||||
);
|
||||
|
||||
|
|
|
@ -1188,7 +1188,7 @@ fn num_sqrt(symbol: Symbol, var_store: &mut VarStore) -> Def {
|
|||
)
|
||||
}
|
||||
|
||||
/// Num.log : Float -> Result Float [ LogOfNegative ]*
|
||||
/// Num.log : Float -> Result Float [ LogNeedsPositive ]*
|
||||
fn num_log(symbol: Symbol, var_store: &mut VarStore) -> Def {
|
||||
let bool_var = var_store.fresh();
|
||||
let float_var = var_store.fresh();
|
||||
|
@ -1220,7 +1220,7 @@ fn num_log(symbol: Symbol, var_store: &mut VarStore) -> Def {
|
|||
)],
|
||||
final_else: Box::new(no_region(tag(
|
||||
"Err",
|
||||
vec![tag("LogOfNegative", Vec::new(), var_store)],
|
||||
vec![tag("LogNeedsPositive", Vec::new(), var_store)],
|
||||
var_store,
|
||||
))),
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue