title: Haskell : Use -XFlexibleContexts to permit this?
body: <p>My code as follows:</p>
  
  <pre><code>calcstep ::Integral a =&gt; a -&gt; a
  calcstep  n = calcstep2 n 0
  
  calcstep2 :: Integral (Integral a, Integral b) =&gt; a -&gt; b -&gt; a
  calcstep2 1 k = k
  calcstep2 n k | odd n = calcstep2 (n/2) (k+1)
                | otherwise = calcstep2 (n*3+1) (k+1)
  </code></pre>
  
  <p>The error is as follows:</p>
  
  <blockquote>
    <p>Non type-variable argument</p>
    
    <p>in the constraint: Integral (Integral a, Integral b)</p>
    
    <p>(Use -XFlexibleContexts to permit this)</p>
    
    <p>In the type signature for `calcstep2':
          calcstep2 :: Integral (Integral a, Integral b) => a -> b -> a</p>
    
    <p>Failed, modules loaded: none.</p>
  </blockquote>
  
  <p>What does it mean? how can I fix it?</p>