Before continuing, make sure you've read:
To make our lives easier while developing in Haskell, we use the following extensions:
- ghcide, the best thing that happened to Haskell for editors/IDEs! ❤️
- hlint, another great extension to have suggestions and refactors in Haskell 🛠
- stylish-haskell, the formatter we use to prettify the code 💅🏼
- editorconfig, to have consistency between different editors and envs 🐀
Regarding the formatter, we use the master
version of stylish-haskell to be able to use language pragmas with lowercase, so you'll need to do this locally:
$ git clone https://github.com/jaspervdj/stylish-haskell
$ ...
$ cd stylish-haskell && stack install
We don't provide any git hook or tool that enforces our style. However, before you propose any PR please make sure to run stylish-haskell
yourself, and to follow our style guide mentioned above to the extent possible. 😊
If you wan't to automate this for your VSCode, add the following to your .vscode/settings.json
:
{
"editor.formatOnSave": true
}
Happy hacking! 👏🏼