knupfer / haskell-emacs

Write Emacs extensions in Haskell
376 stars 22 forks source link

Please provide support for stack #53

Closed michaelp closed 8 years ago

michaelp commented 8 years ago

Please add support for stack as an alternative to cabal sandbox

knupfer commented 8 years ago

I'm working on it

michaelp commented 8 years ago

Please let me know if you need help in testing.

michaelp commented 8 years ago

Any updates?

knupfer commented 8 years ago

It's on my todo list. I was busy with relocation...

mwotton commented 8 years ago

@knupfer really looking forward to the stack port :) looks like a lovely piece of work, wish i'd seen it before I wrote https://github.com/mwotton/emacsplugin

Do you need any help on the stack backend? You've already achieved 90% of what I wanted, so I'm happy to put in some time.

knupfer commented 8 years ago

So, sorry for the delay. With the recent push, you can easily use stack, cabal or nix. @mwotton Could you verify please that it works with stack as you like? I use normally nix, which interacts a bit with stack...

mwotton commented 8 years ago

thanks, seems to install, at least. I'm a bit confused by what I have to do to make the example Matrix library visible, though - I copied it to the right place (~/.emacs.d/haskell-fun/Matrix.hs), but (Matrix.identity 1) in a scratch buffer just tells me the symbol's definition is void. I haven't customised haskell-emacs other than setting the build-tool to stack. Any ideas what I'm missing?

knupfer commented 8 years ago

Have you run M-x haskell-emacs-init ? It copies the example and stuff. Could you provide a ls of your haskell-fun directory?

mwotton commented 8 years ago

ah, ok - didn't realise i needed to run it every time i added a new file. That's the standard workflow?

mwotton commented 8 years ago

(the example is working now, thanks)

knupfer commented 8 years ago

Yes, you have to rerun haskell-emacs-init when adding a new file or changing a file. I'm not aware of an other sensible default. Recompiling on every edit? That would be very expensive...

mwotton commented 8 years ago

it makes sense in retrospect. might be worth making a note of it though? "haskell-emacs-init" sounds like something you run once, rather than rerunning constantly during development.

knupfer commented 8 years ago

Thanks for the pointer, I've updated the readme

mwotton commented 8 years ago

hm. one difficulty: it seems like haskell-emacs-init unconditionally overwrites the stack.yaml - this is a bit of a problem, as that's where you control extra packages and the like...

knupfer commented 8 years ago

Fixed! (please consider opening new issues) Thanks

mwotton commented 8 years ago

heh, righto :)

michaelp commented 8 years ago

Great News! Thank you for your work.