title: Are we allowed to use conditional expression inside the let-in expression in Haskell?
body: <pre><code>kinerja :: Int -&gt; Int -&gt; Int -&gt; (Int, Int, Int, Int)
  kinerja j m d =
      let seconds = j*3600 + m*60 + d
      in 
          let 
              durasi x = abs (seconds - 17*3600 + m*30)
          in
              let js = durasi `div` 3600
                  ms = (durasi `div` 60) `mod` 60
                  ds = durasi `mod` 60
              in
                  if j &lt;= 17 &amp;&amp; m &lt; 30 then (js,ms,ds,1)
                  else if j == 17 &amp;&amp; m == 30 then (js,ms,ds,0)
                  else (js,ms,ds,(-1))
  </code></pre>
  <p>I'm getting error with these code. I'm trying to have tuple output. The element js, ms, and ds are the gap between the clock input and 17.30. The problem is on the element js, ms, and ds. Is there any advice on how to fix it?</p>