When running two or more instances of GHCi, persistent history is only kept for the first one
|Reported by:||arnar||Owned by:|
|Type of failure:||Other||Test Case:|
|Related Tickets:||Differential Revisions:|
The file ~/.ghc/ghci_history maintains the command history for the first running GHCi instance. No persistent history is kept for concurrently running ghci processes. See #2050.
bash provides an option of setting shopt -s histappend, which makes all bash instances share the same history file. Perhaps writing to the same file would be somewhat silly in the case of GHCi, but writing to .ghci_history.2 or similar could be one solution.
Alternatively, a command within GHCi to dump the current instance's command history to a file would work also.