I can't seem to figure out how to get Haskeline to allow the user to use the arrow keys to go through command history.
I read Hackage and tried using Settings { complete = completeFilename, historyFile = Nothing, autoAddHistory = True } like the default they gave and that didn't work, I tried giving historyFile a value and then it would only save the first command I typed in and only after the program was quit, and none of the small tweaks I tried have helped. I can provide the rest of my code if it's relevant.
Not a full answer, but can you test the following minimal example:
You should be able to enter multiple input lines at the prompt and scroll through the history with the arrow keys:
If you Ctrl-C out after entering some lines, they should all appear in the ".foo_history" file:
If the arrow keys don't work, try the Emacs-compatible keystrokes (Ctrl-P and Ctrl-N for previous and next).
Based on this:
putHistoryormodifyHistory) that might be interfering with Haskeline's automatic history handling? If not, is it possible your program is trying to read from the standard input through functions other than Haskeline'sgetInputLine, and maybe "stealing" some of the input that should be processed by Haskeline (e.g., if you meant to read something from a file but accidentally rangetLineinstead ofhGetLine)?