Easier editing of multi-line GHCi-commands
In my terminal emulator I can write something like:
cat > /dev/null << EOF
bla
bla
bla
EOF
If I later want to edit something in this command I can recall the command from history and I can navigate to the line I want to change. In GHCi this is not possible, the history only recalls *one line* at a time. It would be nice if it recognized commands entered using :{ ... }:
and would give you that whole command when recalling commands from the history.
Also, it would be very handy if holding down a modifier key when hitting enter (e.g. Shift) would insert a newline into your multi-line command rather than run the command.
Furthermore, it could also serve as a handy shortcut for engaging the multi-line command mode. So say you were sitting at the prompt >
and you then hit Shift+Enter, then GHCi moves to a new-line but has inserted the :{
part for you, it could similarly close the command for you when you hit Enter (without holding down the modifier key).
I believe this change would make GHCi's multi-line command mode way more useful. Currently I very seldomly (if ever) use GHCi for anything other than one-liners. This means that I usually have to edit the source-file I'm currently working on to put things into scope (or try and formulate a long and awkward expression).