title: Haskell parse error: "possibly incorrect indentation or mismatched brackets"
body: <p>I compile this code and ghc tells me "parse error (possibly incorrect indentation or mismatched brackets)" at the final line ("randSeq :: Integer -> String")</p>
  
  <pre><code>pair = randSeq n ++ " | " ++ randSeq n where do g &lt;- newStdGen
                                               let n = randomR (1,10) g
  
  randSeq :: Integer -&gt; String
  ...
  </code></pre>
  
  <p>I made sure to use space for indentation. I avoided using the 'let' keyword like below but it still yields the same error</p>
  
  <pre><code>pair = randSeq n ++ " | " ++ randSeq n where n = randomR (1,10) g
                                               do g &lt;- newSTdGen
  
  randSeq :: Integer -&gt; String
  ...
  </code></pre>