tfausak / purple-yolk

:hatching_chick: A Haskell IDE for Visual Studio Code.
https://marketplace.visualstudio.com/items?itemName=taylorfausak.purple-yolk
MIT License
26 stars 2 forks source link
haskell ide vscode

Purple Yolk

Purple Yolk is an extension for Visual Studio Code that provides a simple IDE for Haskell projects.

Purple Yolk is designed to work with Haskell projects rather than individual Haskell files. That typically means something with a cabal.project or stack.yaml file. Although Purple Yolk can work with a single Haskell file, its utility is somewhat limited.

At a high level, Purple Yolk launches GHCi for you, reloads it when you make changes, and displays GHCi's output in VS Code. It is designed to work with any project and build tool that can provide a REPL. It includes built-in support for both Cabal and Stack. Other tools are supported via custom configuration.

Features

These are the features that Purple Yolk provides:

Not Implemented

These features are not (yet?) implemented. Most of them require a GHCi session loaded for an individual module rather than the entire project.

Common Problems

If you delete a file/module, you'll have to restart GHCi for the build to succeed. Similarly if you add a new dependency, you'll have to restart GHCi for it to be picked up.

In general, if something goes wrong you should run the "Purple Yolk: Start Interpreter" command to (re)start GHCi. If things go really wrong you can try "Developer: Reload Window" to reload everything.

Purple Yolk produces some chatty output that can help debugging. Use the "Purple Yolk: Show Output" command to see it.

Development

To build Purple Yolk locally and install it, run the following commands:

$ npm install
$ rm -f purple-yolk-*.vsix
$ npx vsce package --pre-release
$ code --install-extension purple-yolk-*.vsix