-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
55 lines (43 loc) · 1.9 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
################################################################################
GHCI_OPTS:=\
--ghci-options '-fdefer-typed-holes -funclutter-valid-hole-fits' \
--work-dir '.stack-work-ghci' \
--test \
--bench \
--main-is ":test"
################################################################################
hoogle: ## Launch a hoogle server
stack hoogle --rebuild --server
ghci: ## Launch ghci with some default settings
stack ghci \
--package=pretty-simple \
--ghci-options=-interactive-print=Text.Pretty.Simple.pPrint \
$(GHCI_OPTS)
test-min: ## Build the library and run the tests using lowest possible dependency versions
stack test \
--ghc-options=-Werror \
--stack-yaml=./stack/stack.min.yaml \
--work-dir ".stack-work-min"
stylish:
find . -name '.stack-work' -prune -o -name 'dist-newstyle' -prune -o -name '*.hs' -exec stylish-haskell -i '{}' \;
release: ## Creates a release package
stack clean --stack-yaml=./stack/stack.min.yaml --work-dir ".stack-work-min"
stack test --stack-yaml=./stack/stack.min.yaml --work-dir ".stack-work-min" --ghc-options=-Werror
stack clean --stack-yaml=./stack/stack.lts-21.25.yaml --work-dir ".stack-work-lts-21.25"
stack test --stack-yaml=./stack/stack.lts-21.25.yaml --work-dir ".stack-work-lts-21.25" --ghc-options=-Werror
stack clean
stack build --test --bench --no-run-tests --no-run-benchmarks --ghc-options=-Werror
stack test
stack2cabal
make hlint
make stylish
stack sdist
hlint: ## Runs hlint on the project
hlint -X QuasiQuotes .
docs: ## Builds haddock documentation and watch files for changes
stack haddock --no-haddock-deps --file-watch
################################################################################
help: ## Display this message
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.DEFAULT_GOAL := help
.PHONY: test-api