-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
53 lines (42 loc) · 1.02 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
.PHONY: nix-shell
nix-shell:
nix-shell --show-trace --pure
.PHONY: check-nix-shell
check-nix-shell:
$(info Checking if running in a nix-shell)
ifndef IN_NIX_SHELL
$(error Not in a nix-shell. Please run nix-shell and run make from there)
endif
.PHONY: hoogle
hoogle: check-nix-shell
hoogle server --local -p 8080 &> /tmp/hoogle.log
.PHONY: lint
lint: check-nix-shell
hlint lint src
.PHONY: clean
clean: check-nix-shell
cabal new-clean
.PHONY: build
build: clean
cabal new-build --ghc-option='-Werror'
.PHONY: test
test: build
ifneq "$(COVERAGE)" ""
cabal new-configure --enable-tests --enable-coverage
endif
cabal new-test --ghc-option='-Werror'
.PHONY: doctests
doctests:
cabal new-test doctests --ghc-option='-Werror'
.PHONY: run
run: build
cabal new-run
.PHONY: cabal-configure
cabal-configure: check-nix-shell
cabal new-configure --enable-tests
.PHONY: repl
repl: cabal-configure
cabal new-repl
.PHONY: interactive
interactive: cabal-configure
ghcid -c "cabal new-repl --ghc-option='-Wwarn' lib:polysemy-examples"