title: Multi-line commands in GHCi
body: <p>I am having problem in entering multi-line commands in ghci.</p>
  
  <p>The following 2-line code works from a file:</p>
  
  <pre><code>addTwo :: Int -&gt; Int -&gt; Int
  addTwo x y = x + y
  </code></pre>
  
  <p>But when I enter in ghci, I get an error:</p>
  
  <pre class="lang-none prettyprint-override"><code>&lt;interactive&gt;:1:1: error:
      Variable not in scope: addTwo :: Int -&gt; Int -&gt; Int
  </code></pre>
  
  <p>I also tried putting the code inside <code>:{ ... :}</code>, but they are also not working for this example, because this is just appending the lines into one line, which should not be the case.</p>
  
  <p>I am using WinGHCi, version 2011.2.0.1</p>