Reputation: 925
When I use the function abs_float
, Merlin (running in emacs) tells me:
Warning 3: deprecated: Core.Std.abs_float
[since 2014-10] Use [Float]
(The code still compiles, though.) What is this trying to tell me? I've tried Float.abs and similar variants without success. When I try #require "Float"
and open Float
in utop, I get No such package
and unbound module
errors.
I know it's trivial to write an absolute value function oneself, but I'm still interested in knowing how to do this the "right" way.
Upvotes: 2
Views: 574
Reputation: 5637
What is this trying to tell me?
The warning message that you're getting:
Warning 3: deprecated: Core.Std.abs_float
is telling you that the function abs_float
has been deprecated. This basically means that, while the function still works, it's no longer supported and advises you to not use it anymore.
When you see the message
Use [Float]
It's telling you that the newer version that you should be using is in the Float
module. This is in the context of Core.Std
, so instead of using
Core.Std.abs_float
you should use
Core.Std.Float.abs
Upvotes: 2