title: No instance for (RealFloat (Ratio Integer))
body: <p>I'm using the stuff provided <a href="https://stackoverflow.com/a/58056645/1100107">here</a> by @DavidYoung. I have a function:</p>
  <pre class="lang-haskell prettyprint-override"><code>hypergeom ::
       forall a. (Eq a, Fractional a, BaseFrac a)
    =&gt; Int            -- truncation weight
    -&gt; BaseFracType a -- alpha parameter (usually 2)
    -&gt; [a]            -- &quot;upper&quot; parameters
    -&gt; [a]            -- &quot;lower&quot; parameters
    -&gt; [a]            -- variables (the eigenvalues)
    -&gt; IO a
  </code></pre>
  <p>But when I run it with <code>a = Complex Rational</code> I get this error:</p>
  <pre><code>No instance for (RealFloat (Ratio Integer))
          arising from a use of `hypergeom'
  </code></pre>
  <p>What does that mean?</p>
  <p>More precisely, here is the command I run:</p>
  <pre><code>ghci&gt; import Data.Ratio
  ghci&gt; import Data.Complex
  ghci&gt; alpha = 2 % 1 :: Rational
  ghci&gt; a = 2 % 10 :+ 1 % 1 :: Complex Rational
  ghci&gt; b = 1 % 2 :+ 0 % 1 :: Complex Rational
  ghci&gt; c = 2 % 1 :+ 3 % 1 :: Complex Rational
  ghci&gt; x1 = 1 % 3 :+ 1 % 4 :: Complex Rational
  ghci&gt; x2 = 1 % 5 :+ 1 % 6 :: Complex Rational
  ghci&gt; hypergeom 10 alpha [a, b] [c] [x1, x2]
  
  &lt;interactive&gt;:28:1: error:
      * No instance for (RealFloat (Ratio Integer))
          arising from a use of `hypergeom'
      * In the expression: hypergeom 10 alpha [a, b] [c] [x1, x2]
        In an equation for `it':
            it = hypergeom 10 alpha [a, b] [c] [x1, x2]
  </code></pre>
  <p>I'm pretty sure this worked in the past but I used <code>Data.Complex.Generic</code> (I don't use it anymore because it's not possible with a recent resolver).</p>