[Haskell-cafe] Yet another stupid question about numeric
conversion
Henk-Jan van Tuyl
hjgtuyl at chello.nl
Tue Aug 21 14:18:31 EDT 2007
On Tue, 21 Aug 2007 18:53:43 +0200, Peter Verswyvelen <bf3 at telenet.be>
wrote:
> Does a general approach exist to convert any non-constant (Num a) to a
> Float? Not using type annotation of course.
Instances of class Integral (Int and Integer) can be converted with
fromIntegral.
--
Met vriendelijke groet,
Henk-Jan van Tuyl
--
http://functor.bamikanarie.com
http://Van.Tuyl.eu/
--
More information about the Haskell-Cafe
mailing list