In a recent stack overflow question in Haskell, kosmikus said that the default stack size for GHCi is 512 MB. I would rather have a smaller stack size, like 2 MB or something else, because if I go beyond that, in almost all cases it will be due to an error on my part. My system does not have a lot of RAM, so a 512 MB stack size sometimes causes some crazy replacement and slowness when I make a mistake in the code.
Is there a way to limit the default stack size for GHCi in a .ghci file or somewhere else?
I know what I need to create
alias ghci='ghci +RTS -K2M -RTS'
as a last resort, but I would like to avoid this if possible.
source share