Hi,

The way I work with Haskell is this:

* set up default.nix in project directory
* run nix-shell --pure to pull in all dependencies
* optionally manually run cabal build in case some CPP and symbol
generation needs to happen (I'd like to know the proper way here but
that's for another thread)
* once I'm ready, open one of the files in the project in emacs
* evaluate (setq haskell-program-name "nix-shell --pure --command ghci")
* use the C-c C-l combo to start GHCi and work with the loaded file

My problem is that whenever I press C-c C-l again to reload the file
after I've made some changes, it seems to re-invoke nix-shell or something.

[shana@lenalee:~]$ df | grep /dev/sdb1
/dev/sdb1        51475068   39467668    9369576  81% /

-- reload here

[shana@lenalee:~]$ df | grep /dev/sdb1
/dev/sdb1        51475068   39467684    9369560  81% /

That is every time I reload, more disk space gets eaten. This is a real
problem when hacking on larger projects, I had previously eaten through
6GB+ of space before I ran out of memory on /.

Does anyone know of a proper way to invoke GHCi without effectively
restarting the shell? Am I barking up the wrong tree perhaps and should
be taking it to emacs haskell-mode guys?

I suppose the question I'm asking is ‘is there a way to drop into an
existing nix-shell session?’.

-- 
Mateusz K.
_______________________________________________
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to