1 override GHCID_OPTIONS += --no-height-limit --reverse-errors
2 override REPL_OPTIONS += -ignore-dot-ghci
4 cabal := $(wildcard *.cabal)
5 package := $(notdir ./$(cabal:.cabal=))
6 version := $(shell sed -ne 's/^version: *\(.*\)/\1/p' $(cabal))
7 project := $(patsubst %.cabal,%,$(cabal))
8 cabal_builddir ?= dist-newstyle
12 cabal run $(CABAL_RUN_FLAGS)
14 cabal build $(CABAL_BUILD_FLAGS)
18 cabal repl $(CABAL_REPL_FLAGS) $(project)
20 ghcid $(GHCID_OPTIONS) --command 'cabal repl -fno-code $(CABAL_REPL_FLAGS) $(project) $(addprefix --repl-options ,$(REPL_OPTIONS))'
23 cabal haddock --haddock-css ocean --haddock-hyperlink-source
27 ! git tag --merged | grep -Fqx $(package)-$(version)
29 git tag -f $(package)-$(version)
30 git-chglog --output $@.new --tag-filter-pattern '$(package)-.*' $(package)-$(version)
34 git tag -d $(package)-$(version)
36 git commit -m 'doc: update `$@`'
38 git tag -s -m $(package)-$(version) $(package)-$(version)
44 cabal haddock --haddock-for-hackage --enable-doc
47 git push --follow-tags $(GIT_PUSH_FLAGS)
48 cabal upload $(CABAL_UPLOAD_FLAGS) "$(cabal_builddir)"/sdist/$(package)-$(version).tar.gz
49 cabal upload $(CABAL_UPLOAD_FLAGS) --documentation "$(cabal_builddir)"/$(package)-$(version)-docs.tar.gz
50 %/publish: CABAL_UPLOAD_FLAGS+=--publish
53 publish: upload/publish
56 .hlint.yaml: $(shell find src -name '*.hs' -not -name 'HLint.hs')
57 sed -i -e '/^# BEGIN: generated hints/,/^# END: generated hints/d' $@
58 echo >>$@ '# BEGIN: generated hints'
59 hlint --find . | grep -- '- fixity:' | sort -u >>$@
60 echo >>$@ '# END: generated hints'
62 if hlint --quiet --report=hlint.html -XNoCPP $(HLINT_FLAGS) .; \
63 then rm -f hlint.html; \
64 else sensible-browser ./hlint.html & fi
67 cd src; time doctest --verbose --fast Symantic/Compta/Demo.hs \
68 -Wno-missing-methods \
75 -XDerivingStrategies \
79 -XGeneralizedNewtypeDeriving \
81 -XMultiParamTypeClasses \
83 -XNoMonomorphismRestriction\
87 -XScopedTypeVariables \
88 -XStandaloneDeriving \