title: Limit default stack size in GHCi
body: <p>In <a href="https://stackoverflow.com/a/20313059/1463507">a recent question about stack overflows in Haskell</a> kosmikus said the default stack size of GHCi is 512 MB. I would much rather have a smaller stack size, like 2 MB or something, because if I go beyond that, in almost all cases, it will be because of an error on my part. My system doesn't have very much RAM, so a stack size of 512 MB sometimes causes some crazy swapping and slowness when I make a mistake in the code.</p>
  
  <p><strong>Is there a way to limit the default stack size of GHCi, in the <code>.ghci</code> file or somewhere else?</strong></p>
  
  <p>I'm aware that I should be able to create an</p>
  
  <pre class="lang-sh prettyprint-override"><code>alias ghci='ghci +RTS -K2M -RTS'
  </code></pre>
  
  <p>as a last resort, but I'd like to avoid that if possible.</p>