<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-GB" link="blue" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Also, I wonder if you’re typing:</p>
<p class="MsoNormal"><span style="font-family:"Courier New"">> 5 mod 2<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">This does give a FlexibleContexts error. You should type either:</p>
<p class="MsoNormal"><span style="font-family:"Courier New"">> mod 5 2<o:p></o:p></span></p>
<p class="MsoNormal">or</p>
<p class="MsoNormal"><span style="font-family:"Courier New"">> 5 `mod` 2<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">(or, using mod’ as suggested):</p>
<p class="MsoNormal"><span style="font-family:"Courier New"">> 5.5 `mod'` 1.3<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">You can read about prefix and infix notation <a href="http://learnyouahaskell.com/starting-out">
here</a>.</p>
<p class="MsoNormal"><br>
David.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="border:none;padding:0cm"><b>From: </b><a href="mailto:bob@redivi.com">Bob Ippolito</a><br>
<b>Sent: </b>20 February 2021 23:11<br>
<b>To: </b><a href="mailto:beginners@haskell.org">The Haskell-Beginners Mailing List - Discussion of primarily beginner-level topics related to Haskell</a><br>
<b>Subject: </b>Re: [Haskell-beginners] Using Fractional Type</p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">I think what you're looking for is the mod' function from Data.Fixed. The mod function only works with Integral types, FlexibleContexts wouldn't be helpful for this.<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Sat, Feb 20, 2021 at 12:00 PM A. Mc. <<a href="mailto:47dragonfyre@gmail.com">47dragonfyre@gmail.com</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<p class="MsoNormal">Hello,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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).<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks in advance and thank you for your time.<o:p></o:p></p>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal" style="margin-left:4.8pt">_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org" target="_blank">Beginners@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>