1 override REPL_OPTIONS += -ignore-dot-ghci
2 override GHCID_OPTIONS += --no-height-limit --reverse-errors
4 cabal := $(wildcard *.cabal)
5 package := $(notdir ./$(cabal:.cabal=))
6 version := $(shell sed -ne 's/^version: *\(.*\)/\1/p' $(cabal))
7 project := $(patsubst %.cabal,%,$(cabal))
11 cabal build $(CABAL_BUILD_FLAGS)
15 cabal repl $(CABAL_REPL_FLAGS) $(project)
17 ghcid $(GHCID_OPTIONS) -c 'cabal repl $(CABAL_REPL_FLAGS) $(project) $(addprefix --repl-options ,$(REPL_OPTIONS))'
20 cabal haddock --haddock-css ocean --haddock-hyperlink-source
23 git tag --merged | grep -Fqx "$(package)-$(version)" || \
24 git tag -f -s -m "$(package) v$(version)" $(package)-$(version)
28 cabal haddock --haddock-for-hackage --enable-doc
31 cabal upload $(CABAL_UPLOAD_FLAGS) dist-newstyle/sdist/$(package)-$(version).tar.gz
32 cabal upload $(CABAL_UPLOAD_FLAGS) --documentation dist-newstyle/$(package)-$(version)-docs.tar.gz
33 %/publish: CABAL_UPLOAD_FLAGS+=--publish
36 publish: upload/publish
41 nix flake update --recreate-lock-file
43 nix -L develop --command cabal repl $(CABAL_REPL_FLAGS)