When running two or more instances of GHCi, persistent history is only kept for the first one
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 (closed).
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.
Trac metadata
Trac field | Value |
---|---|
Version | 6.10.4 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | GHCi |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |