<div dir="ltr">Ah, I had no ideal the real typeclass existed, that completely solves my issue.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On 12 December 2013 20:39, Ben Gamari <span dir="ltr"><<a href="mailto:bgamari.foss@gmail.com" target="_blank">bgamari.foss@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">EatsKittens <<a href="mailto:temporalabstraction@gmail.com">temporalabstraction@gmail.com</a>> writes:<br>

<br>
> Is there a way to add a method to a typeclass like num to implement this<br>
> concept? A function that converts any number to floats?<br>
><br>
</div>Does the following do what you expect?<br>
<br>
realToFrac :: (Fractional b, Real a) => a -> b<br>
<br>
realToFrac' :: (Real a) => a -> Float<br>
realToFrac' = realToFrac :: (Real a) => a -> Float<br>
<br>
Cheers,<br>
<br>
- Ben<br>
</blockquote></div><br></div>