Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Persistent console history in ghci

Tags:

haskell

ghci

On 6.12.2, this just worked for me, I think. But now I'm on a new box with 6.12.3 (generic unix binary), and there's obviously some setting I'm missing.

I have a console history in ghci within a single session (i.e. execution of ghci), but this history isn't saved and reloaded between sessions, as it used to be. I can't keep track if ghci is using readline, editline, or haskeline even, so I'm not quite sure where to start in terms of fixing this.

like image 372
sclv Avatar asked Nov 22 '10 19:11

sclv


People also ask

How do I interrupt GHCi?

Quits GHCi. You can also quit by typing control-D at the prompt. Attempts to reload the current target set (see :load ) if any of the modules in the set, or any dependent module, has changed.

How do I run a Haskell file in GHCi?

Open a command window and navigate to the directory where you want to keep your Haskell source files. Run Haskell by typing ghci or ghci MyFile. hs. (The "i" in "GHCi" stands for "interactive", as opposed to compiling and producing an executable file.)

What does GHCi mean in Haskell?

Introduction. GHCi is GHC's interactive environment, in which Haskell expressions can be interactively evaluated and programs can be interpreted.


1 Answers

This might not be of much help but have you checked whether the ghci_history file is being written to in ~/.ghc/ghci_history?

like image 108
Sean Seefried Avatar answered Oct 05 '22 18:10

Sean Seefried