https://github.com/prikhi/hpack-template
Stack Templates for Generic/CLI Applications and Libraries using Hpack, Tasty, & Github Actions.
https://github.com/prikhi/hpack-template
haskell hedgehog hpack hunit stack stack-template tasty template
Last synced: 3 months ago
JSON representation
Stack Templates for Generic/CLI Applications and Libraries using Hpack, Tasty, & Github Actions.
- Host: GitHub
- URL: https://github.com/prikhi/hpack-template
- Owner: prikhi
- Created: 2020-02-14T17:56:56.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-05-08T03:27:02.000Z (over 2 years ago)
- Last Synced: 2025-02-02T01:03:03.811Z (9 months ago)
- Topics: haskell, hedgehog, hpack, hunit, stack, stack-template, tasty, template
- Language: Haskell
- Homepage: https://raw.githubusercontent.com/prikhi/hpack-template/master/hpack.hsfiles
- Size: 49.8 KB
- Stars: 6
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# hpack-template
A stack template for an executable, libary, and test-suite using `hpack`'s
`package.yaml`.
The test-suite is built using `tasty` and uses `HUnit` for unit tests and
`hedgehog` for property tests. GitHub Actions are included to build the project
with the latest Stackage LTS, Stackage Nightly, & the last 3 version of GHC.
To start a new project with this template, run:
```sh
stack new https://raw.githubusercontent.com/prikhi/hpack-template/master/hpack.hsfiles
```
The `hpack-lib.hsfiles` is similar but geared towards libraries instead of
applications. It does not include an executable section, modifies the compiler
flags to support GHC versions under 8.0, lower the bounds of the `base`
package, includes the `base-compat-batteries` package to reduce the CPP
macros necesary for supporting multiple GHC versions, & uses GitHub Actions to
test multiple Stackage LTSes and GHC versions.
```sh
stack new https://raw.githubusercontent.com/prikhi/hpack-template/master/hpack-lib.hsfiles
```
## Generation
The `*.hsfiles` are generated with
[stack-templatizer](https://github.com/prikhi/stack-templatizer) using the
files in the `hpack` & `hpack-lib` directories.
Install the templatizer with `stack install --resolver nightly
stack-templatizer`, then run `stack-templatizer hpack` & `stack-templatizer
hpack-lib` to regenerate the template files.
## LICENSE
BSD-3