<br><div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Is it proper/ok to defines them as :<br>fromIntegral :: (a::Integral) -> (b::Num)
<br>and<br>round :: (a::RealFrac) -> (b::Integral) ?
</blockquote><div><br>No; Integral, Num and RealFrac are type classes, not types. Think of a type class as a "set of types" which all support certain operations. For example, anything in the Num class must implement +, -, *, and a few other things. So a type signature like (Integral a) => a means "any type a, as long as it is in the type class Integral".
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Is RealFrac is-a Num ?</blockquote><div><br>Yes, any type which is in the RealFrac type class must also be in the Num type class.
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Does the order matters in (Num b,Integral a) => a -> b or<br> (Integral a,Num b) => a -> b
</blockquote><div><br>No, the order of type class constraints doesn't matter.<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
With your encouragements, I'll keep pluuging. Thanks.
</blockquote><div><br>Good luck! <br></div>-Brent<br></div><br>