title: haskell subtract error
body: <pre><code>answerFalse::Int-&gt;IO()
  answerFalse hp=do
              hp--
              if hp&lt;=0 then
                  putStrLn"================Game Over================"
  
              else
                  print(hp)
  </code></pre>
  
  <p>i already declare hp as int with value 3
  now my problem is when i put "hp--", it shows error </p>
  
  <pre><code> Couldn't match expected type `IO a0' with actual type `Int'
  </code></pre>
  
  <p>but if i put "--hp", the result print is 3 not 2.</p>
  
  <p>i also tried let hp=hp-1, the system stuck there.</p>