2 ms·
For one, GHCi doesn't even provide the whole language. You can't define new types, classes, or instances, and as a matter of syntax you have to use explicit bra
by skew 17y ago
For one, GHCi doesn't even provide the whole language. You can't define new types, classes, or instances, and as a matter of syntax you have to use explicit braces or semicolons for multi-line things. I haven't used it much, but O'Caml's REPL is better on these counts.
As far as semantics, GHCi doesn't let you redefine a function and continue working, largely, I suspect, because Haskell doesn't describe how that should work.
Conversely, if you keep your source open in an editor and reload, then you can change classes, macros, etc, but you lose your state across reloading (declaring top-level values to set up your testing state can help, but it's less fluid).