Skip to content
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

Support testing #817

Closed
vlatkoB opened this issue Aug 18, 2015 · 7 comments
Closed

Support testing #817

vlatkoB opened this issue Aug 18, 2015 · 7 comments

Comments

@vlatkoB
Copy link
Contributor

vlatkoB commented Aug 18, 2015

There seems to be no support for testing in haskell-mode. I tried this:

(defun haskell-process-cabal-repl-test ()
  (interactive)
  (setq haskell-process-args-cabal-repl '("test"))
  (haskell-process-load-or-reload)
  (setq haskell-process-args-cabal-repl '("--ghc-option=-ferror-spans" "--with-ghc=ghci-ng"))
 )

and can run tests.

What would be the proper way to implement it? Maybe also add the function to run a test at point?

@ivan-m
Copy link
Contributor

ivan-m commented Aug 18, 2015

Sure there is: haskell-session-change-target and then enter in the name of the test you want to edit/evaluate/build/etc.

That said, @mrkkrp's ebal has some support for running test suites.

@vlatkoB
Copy link
Contributor Author

vlatkoB commented Aug 19, 2015

Thanks for pointing me to haskell-session-change-target. I do not recall I read about it in docs.

ebal looks interesting.

@vlatkoB vlatkoB closed this as completed Aug 19, 2015
@gracjan
Copy link
Contributor

gracjan commented Aug 19, 2015

@vlatkoB: Can you try to describe the workflow in document haskell-mode.texi?

@vlatkoB
Copy link
Contributor Author

vlatkoB commented Aug 19, 2015

I added a small description. (Not sure why PR is not displayed here.)

Was this what you meant?
If yes, please review it. English is not my mother tongue, and see if style suits you.

@vlatkoB
Copy link
Contributor Author

vlatkoB commented Aug 19, 2015

Would be nice if haskell-session-change-target would display ido choice of sections, instead of typing the section name.

gracjan added a commit that referenced this issue Aug 19, 2015
Describe haskell-session-change-target for test & bencmark, #817
@ivan-m
Copy link
Contributor

ivan-m commented Aug 20, 2015

Maybe grab the code that does that from https://github.com/mrkkrp/ebal ?

@vlatkoB
Copy link
Contributor Author

vlatkoB commented Aug 22, 2015

Just created a PR with a new function that enables choosing a target from available targets in .cabal file..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants