diff --git a/compiler/builtins/src/std.rs b/compiler/builtins/src/std.rs index 9d16d8d34c..e4c989c521 100644 --- a/compiler/builtins/src/std.rs +++ b/compiler/builtins/src/std.rs @@ -431,8 +431,8 @@ pub fn types() -> MutMap { ); // 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::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)), ), ); diff --git a/compiler/can/src/builtins.rs b/compiler/can/src/builtins.rs index 79c988f0ff..f08123ed95 100644 --- a/compiler/can/src/builtins.rs +++ b/compiler/can/src/builtins.rs @@ -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, ))), };