-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.base
64 lines (48 loc) · 1.13 KB
/
Makefile.base
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
56
57
58
59
60
61
62
63
64
.PHONY: cisetup
cisetup:
stack setup
.PHONY: citest
citest: test
.PHONY: cidocs
cidocs: docs
.PHONY: cicompress
cicompress:
tar -cvzf /tmp/haddock.tar.gz -C $$(stack path --local-install-root) doc
.PHONY: build
build:
stack build
.PHONY: clean
clean:
stack clean --full
.PHONY: buildsplices
buildsplices:
stack build --ghc-options='-ddump-splices'
.PHONY: dumpsplices
printsplices:
find .stack-work -iname "*.dump-splices" | xargs -t -L1 cat
.PHONY: splices
splices: buildsplices printsplices
.PHONY: test
test:
stack test
.PHONY: ghci
ghci:
stack ghci --ghci-options "-ghci-script .ghci-manual"
.PHONY: docs
docs:
stack haddock --no-haddock-deps
.PHONY: deps
deps:
stack build --copy-compiler-tool apply-refact hlint stylish-haskell ghcid
.PHONY: watch
watch:
stack exec -- ghcid --lint=`stack exec -- which hlint`
.PHONY: format
format:
find . -name '*.hs' | xargs -t stack exec -- stylish-haskell -i
.PHONY: lint
lint:
stack exec -- hlint -i 'Parse error' -i 'Reduce duplication' src
.PHONY: refactor
refactor:
find . -path ./.stack-work -prune -o -name '*.hs' | xargs -t -L1 stack exec -- hlint --refactor --refactor-options -i