Virthualenv integration #84

Closed
wants to merge 6 commits into
from

Conversation

Projects
None yet
3 participants
@boothead

I had some problems with a snap project and the code reloading under cabal-dev so I've had a stab at getting virthualenv working with haskell-mode. I've got the basics of virthualenv integration in this pull request. It's pretty alpha (and it's also the first elisp I've written) so I'd like to ask for some help to get it up to scratch.

At the moment you use it like this:

Set the virthaulenv on the current session
M-x haskell-process-ve

This prompts you for the virthualenv location and attempts to find it much like setting the .cabal file location. Note You have to already have a haskell-session for this to work.

You can then activate the virthualenv with
M-x haskell-virthualenv-activate

After you've done this the prompt in interactive mode looks like
(snap) λ>

haskell-process-type has to be ghci. It would seem to make sense to enforce or set this when activating the virthualenv but I wasn't sure if there's a use case for cabal-dev within a virthualenv so I haven't done anything about that yet.

ISSUES

  • I couldn't quite see how to set the prompt in the interactive mode straight away - the (<virthualenv-name>) only appears after I've run the first command in the interactive window
  • Should it be a minor mode?
  • The haskell-process-ve only seems to be available after I've run C-c C-l to get a session. I assume that this is due to the autoloading? It would be nice to have a better way to set the virthualenv up initially.
  • No integration with haskell-process-start as yet. I wanted to keep touching other files to a minimum initially, but I think it would make more sense to work the presence of a virthualenv on the session impact on what's passed to haskell-process-set-process inside haskell-process-start
@konn

This comment has been minimized.

Show comment
Hide comment
@konn

konn Mar 15, 2013

I need the hsenv (previously called virthualenv) support for haskell-mode, too. I have to use hsenv to write the program using GHC HEAD's feature.
I hope this patch would be merged.

konn commented Mar 15, 2013

I need the hsenv (previously called virthualenv) support for haskell-mode, too. I have to use hsenv to write the program using GHC HEAD's feature.
I hope this patch would be merged.

@bos

This comment has been minimized.

Show comment
Hide comment
@bos

bos May 15, 2013

Contributor

I'm sorry that this patch set didn't get any sort of timely attention. Could you please rebase it?

Contributor

bos commented May 15, 2013

I'm sorry that this patch set didn't get any sort of timely attention. Could you please rebase it?

@boothead

This comment has been minimized.

Show comment
Hide comment
@boothead

boothead May 15, 2013

I'll rewrite it @bos. I looked at getting up to date a little while ago and a lot had changed underneath. I'll close this one for now and open another one.

I'll rewrite it @bos. I looked at getting up to date a little while ago and a lot had changed underneath. I'll close this one for now and open another one.

@boothead boothead closed this May 15, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment