File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- CABAL = cabal \
2- --offline \
3- $(if $(GHC ) , --with-compiler=$(GHC ) )
1+ CABAL_OPTS ?=
2+ CABAL ?= cabal \
3+ --offline \
4+ $(if $(GHC ) , --with-compiler=$(GHC ) ) \
5+ $(CABAL_OPTS )
6+
7+ CABAL_REPL ?= $(CABAL ) \
8+ --repl-option -fdiagnostics-color=always \
9+ -flocal-dev v2-repl lib:test-dev
10+
11+ GHCIWATCH_OPTS ?=
12+ GHCIWATCH ?= ../../../target/release/ghciwatch \
13+ --command "$(CABAL_REPL ) " \
14+ --before-startup-shell "make my-simple-package.cabal" \
15+ --watch src \
16+ --watch test \
17+ --watch test-main \
18+ $(GHCIWATCH_OPTS )
419
520my-simple-package.cabal : package.yaml
621 hpack .
@@ -11,8 +26,12 @@ test: my-simple-package.cabal
1126 $(CABAL ) test
1227 $(CABAL ) -flocal-dev build
1328 $(CABAL ) -flocal-dev test
14- echo " :quit" | $(CABAL ) -flocal-dev repl lib:test-dev
29+ echo " :quit" | $(CABAL_REPL )
1530
1631.PHONY : ghci
1732ghci : my-simple-package.cabal
18- $(CABAL ) -flocal-dev repl lib:test-dev
33+ $(CABAL_REPL )
34+
35+ .PHONY : ghciwatch
36+ ghciwatch :
37+ $(GHCIWATCH )
You can’t perform that action at this time.
0 commit comments