[Haskell-beginners] Decent Haskell REPL?
korpios at korpios.com
Sat Feb 20 11:33:30 EST 2010
On Sat, Feb 20, 2010 at 9:31 AM, Jon Harrop <jon at ffconsultancy.com> wrote:
> On Friday 19 February 2010 18:46:30 Tom Tobin wrote:
>> On Fri, Feb 19, 2010 at 1:57 PM, Jon Harrop <jon at ffconsultancy.com> wrote:
>> > GHCI seems to require type definitions to be described in a separate file
>> > and then loaded into the REPL, which is seriously tedious.
>> > Are there any Haskell REPLs that don't have such limitations and,
>> > preferably, use JIT compilation instead of an interpreter?
>> I run Haskell in an inferior shell in Emacs alongside haskell-mode;
>> it's easy to get immediate feedback to my changes that way.
> What's your procedure for getting ghci to interpret a type definition?
I just hit C-c C-r in my Haskell source file's buffer to get it
reloaded in the inferior ghci shell.
I think it's best to think of the source file as your scratchpad for
editing, with the "main" function changed as you go along to show
relevant output for testing, and the inferior ghci buffer as just an
"output window" of sorts. It's not the same as writing code directly
shell, but I actually prefer it this way for all languages now, not
just Haskell -- particularly since it's much nicer editing code in a
proper editor vs. in a shell.
More information about the Beginners