[Haskell-beginners] Using Fractional Type

A. Mc. 47dragonfyre at gmail.com
Sat Feb 20 19:59:07 UTC 2021


Hello,

I need to create a function that does: mod (recip x) y.  However, I am
getting all kinds of errors with the type signature.  Is there a better way
to use Fractional type than needing to enable FlexibleContexts?  What do I
need to do to still make use of Haskell's type system, but also still be
able to perform operations such as reciprocal (and division into fractions
for that matter).

Thanks in advance and thank you for your time.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20210220/8962d2de/attachment.html>


More information about the Beginners mailing list