[Haskell-cafe] Yet another stupid question about numeric conversion
bf3 at telenet.be
Tue Aug 21 12:53:43 EDT 2007
Does a general approach exist to convert any non-constant (Num a) to a
Float? Not using type annotation of course.
Now I wrote a Convert class that has a toFloat function which I instantiate
for all different numeric types, but as all these toFloat/toInt functions
disappeared a long time ago from Haskell, it feels like a bad idea to
reintroduce them locally in my code...
More information about the Haskell-Cafe