title: Why can't a Num be compared to 0?
body: <p>This function is incorrect and won't compile:</p>
  
  <pre><code>checkIsZero :: (Num a) =&gt; a -&gt; String
  checkIsZero a = if a == 0
                    then "Zero"
                    else "Not zero"
  </code></pre>
  
  <p>This doesn't work because of the comparison between a <code>Num</code> and <code>0</code> in the expression <code>a == 0</code>. Changing <code>Num</code> to <code>Integral</code> makes this a valid function.</p>
  
  <p>What is this wicked sorcery that doesn't let me compare my numbers to <code>0</code>?!</p>