-
Notifications
You must be signed in to change notification settings - Fork 347
Added nix-shell-ghci support. #350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
It still works. A bit more tested I guess. |
Thanks! Hey @ocharles, you were hacking on something similar -- please can you review/comment on this PR? |
I was doing stuff with ghc-mod, not haskell-mode. I can give this a try though! |
like @purcell noted, this may conflict with the current ideas to have haskell-mode do something DWIM-ish that works in 99% of all cases. |
I don't think there's a conflict with #348 (which I submitted because it On Wed, Oct 1, 2014 at 6:09 PM, Herbert Valerio Riedel <
|
I've added nix-shell-cabal-repl as an option as well. |
15c5019
to
1a16c90
Compare
updated to HEAD |
@alexanderkjeldaas Looks good to me. Please can you redo that last commit now that I've fixed the code which calls |
afb8aeb
to
3c9279d
Compare
@purcell Updated to HEAD |
3c9279d
to
3ab05b6
Compare
Just been reviewing this in detail. Since this PR adds 2 more process types rather than 1, I wonder if an alternative might be to simply have a custom var which tells |
Changing So in that case, the On Thu, Oct 16, 2014 at 9:05 PM, Steve Purcell [email protected]
|
Yes, this might be useful to me. For example, I'm using hsenv on some projects and docker on others. I could define a wrapper that would (defcustom haskell-process-wrapper
nil
"A wrapper program to launch the Haskell process defined by `haskell-process-type`.
Nix users may want to use the value (\"nix-shell\" \"--command\"),
Docker users may want to use something like \"run-my-docker\"."
:group 'haskell-interactive
:type '(choice string (repeat string))) This allows us to support Nix and other things without having to special-case them if we don't have to, and you can still put this variable in a |
Also consider that haskell-process tends to run things (e.g. the |
@chrisdone Yes, that's exactly the kind of solution I was picturing. |
In terms of functionality, I can confirm that this works exactly how one would expect :) |
I may have found a bug.
|
@ocharles can you write how you're configuring it? I'm not familiar with nix but probably the fix is trivial if I can reproduce. |
@chrisdone The only things I have in my '(haskell-font-lock-symbols (quote unicode))
'(haskell-process-args-cabal-repl (quote ("--ghc-option=-ferror-spans" "-fPIC")))
'(haskell-process-args-nix-shell (quote ("shell.nix" "-I" ".")))
'(haskell-process-log t)
'(haskell-process-type (quote nix-shell-cabal-repl)) Is that the information you're looking for? |
Hello, I tried something along what @purcell and @chrisdone mentioned. Here is the full comparison view - https://github.com/ardumont/haskell-mode/compare/add-haskell-process-wrapper?expand=1. I'm still working on it but the wrapping side works on my side (need to see what's wrong for the default). I only tested with the nix-shell on my ardumont/haskell-lab project - https://github.com/ardumont/haskell-lab/blob/master/haskell-lab.nix. Are you interested? Cheers, |
Turns out the non wrapping side works too (just that cabal-repl with a cabal < 16 will not happen :D). |
Following the discussion from haskell#350 (comment), creating a haskell-process-wrapper.
Following the discussion from haskell#350 (comment), creating a haskell-process-wrapper.
Following the discussion from #350 (comment), creating a haskell-process-wrapper. Excluded cask tests.
Following the discussion from #350 (comment), creating a haskell-process-wrapper. Excluded cask tests.
I think this can be closed? |
Hello, I think so. tony / @ardumont On Sun, Feb 15, 2015 at 6:58 PM, Moritz Kiefer [email protected]
|
A 5 minute hack, 95% untested, but I get my ghci prompt.