title: Handling nested if-else-then in do blocks in Haskell
body: <p>I've found that I don't know how to handle nested <code>if-else-then</code> in <code>do</code>-blocks in Haskell.</p>
  
  <p>I know already that I can use a <code>case</code>, but that would require all my conditions (<code>a</code>, <code>b</code> and <code>c</code>) to return the same type (<code>Bool</code>, so there are only two cases, but I need three distinct ones) and is therefore not as general (correct me if I'm wrong). I have also tried considering using guards here, but I don't know how to make this work in a <code>do</code> statement, especially if the <code>-- something</code> expressions are meant to be of type <code>IO ()</code>.</p>
  
  <p>Suppose I have the following code that is inside a <code>do</code>:</p>
  
  <pre class="lang-hs prettyprint-override"><code>if a then
       -- something
  else 
      if b then
          -- something
      else
          if c then
              -- something
          else
              -- something
  </code></pre>
  
  <p>How do I create the equivalent logic but without all the indenting?</p>