On Thu, 12 Dec 2013 20:19:35 +0100, EatsKittens <temporalabstraction@gmail.com> wrote:Non-text part: text/html
> Is there a way to add a method to a typeclass like num to implement this
> concept? A function that converts any number to floats?
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
The typeclass Real has this in a slightly different form:
toRational :: Real a => a -> Rational
You can use fromRational :: Rational -> Float together with this to
implement your function.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe