haskelly-dev / Haskelly

Haskelly is a VS Code extension that provides complete support for casual and expert Haskell development.
https://marketplace.visualstudio.com/items?itemName=UCL.haskelly
GNU General Public License v3.0
152 stars 17 forks source link

AutoRun on Save ? #76

Closed pcarbonn closed 6 years ago

pcarbonn commented 6 years ago

It would be great to run my Haskell program immediately on Save, in the REPL. Can that be done ?

martrik commented 6 years ago

This is now supported in version 0.5.4 by overriding the configuration variable haskelly.buttons.stackBuildParams to include --file-watch (so --fast --file-watch). This can be changed in the Preferences -> Settings.

pcarbonn commented 6 years ago

Many thanks !

Please note that the exact configuration parameter should be --fast --file-watch --exec myproject, where myproject is the name of my executable.

Unfortunately, this creates a full build, and so it is not very fast. I'm going to use ghcid instead.

martrik commented 6 years ago

Yes you are right, my suggested params would only build, not run on-save. ghcid seems a good solution!