3 ms·
I think ghci is one of the best repls out there: - :type and :info - :doc - Debugger + breakpoints - :print :sprint for understanding laziness - Can run sh
by whateveracct 6y ago
I think ghci is one of the best repls out there:
- :type and :info
- :doc
- Debugger + breakpoints
- :print :sprint for understanding laziness
- Can run shell commands with :!
- Can set different compilation flags for the loaded code vs the repl session.
- Can define your own repl commands
I use ghci for developing standalone modules, running HTTP servers, and running unit tests.
The biggest thing I wish it had was something like chez scheme's `trace`, which causes it to print out a function with its arguments every time it is called.
- dllthomas 6y agoI like GHCi, but it's definitely missing some things if we're talking about using a REPL for development rather than just experimentation (which is a valuable thing itself). The two biggest things, I think, are: 1) GHCi allows rebinding symbols, which is great, but it doesn't have good mechanisms for propagating that change. Haskell being Haskell, I don't really expect change local binding to propagate to everywhere that binding has been used. But it would be great if I could point at an identifier I've declared and say "redefine everything that was used to get here". 2) The path from REPL to source code in a file is very manual. I often find myself copying code out of my history, and have to manually remove bindings that I've shadowed since. The tooling that it does provide, though, is really great :)