title: Problems with types in Haskell
body: <p>I have some problems with the different types in Haskell, how can I solve this?</p>
  
  <p>Couldn't match expected type <code>Integer</code> with actual type <code>Int -&gt; t0 -&gt; t0</code></p>
  
  <p>Thanks</p>
  
  <pre><code>isPrime :: Int -&gt; Bool
  isPrime number
      | (number == 1) || (number == 2) = True
      | even number = False
      | otherwise = checkDiv number (fromInteger (`sqrt` number))
  
  checkDiv :: Int -&gt; Int -&gt; Bool
  checkDiv number divisor 
      | number == 2 = True
      | (floor number `mod` divisor) == 0 = False
      | otherwise = checkDiv number $ divisor - 1
  </code></pre>