Does anyone know of an opinionated project scaffold for Haskell (to quickly create a new project)? I’m familiar with summoner, but in a feature request thread, it’s explained that summoner’s goal is to not be too opinionated, which leaves many manual steps to get a complete project.
In my mind, a complete scaffold would include:
- create a single cabal file with:
- a library component, if requested
- an executable component, if requested
- a test component
- uses a modern prelude
-
cabal build
succeeds with no errors/warnings -
cabal test
succeeds no errors/warnings/test failures - a common testing library is configured. I’d be open to a different opinion on what this should include, but I would suggest:
- tasty-discover
- tasty-hspec
- an example test in the style of the chosen test library
- opening the project in VSCode with the haskell-language-server works with no errors/warnings
- autocompletion works
- inline warnings and errors work
I’ve been trying to document how create a new project like this, and it unfortunately takes over 30 minutes, even using summoner, and given I know all the undocumented gotchas like needing to generate hie.yaml
, what the difference between stack and cabal is, and knowing all the libraries I’ll need to pull in.
If would be great if there were a quick way for folks (especially those new to haskell) to create a new project with modern conventions. Any additional thoughts about what other features a basic project scaffold should include and pointers to any existing solutions that solve or partially solve this problem are welcome. Thanks!