From 1ac897805003ad3f1f28d7d43c790bed12242c3f Mon Sep 17 00:00:00 2001 From: cstml Date: Tue, 10 Aug 2021 09:14:42 +0100 Subject: [PATCH] update: new makefile --- makefile | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/makefile b/makefile index 4f8c313..562d228 100644 --- a/makefile +++ b/makefile @@ -1,4 +1,5 @@ -.PHONY: clean reformat build lint-watch compile-watch haddock-generate repl-start +.PHONY: clean reformat build lint-watch compile-watch haddock-generate \ + repl-start documentation # Run the main executable run: build @@ -19,21 +20,22 @@ repl-start: # Start a lint watcher lint-watch: - ls **/*.hs | entr hlint . + ls **/* | entr hlint . + +lint: + hlint . # Start a compilation watcher compile-watch: - nix-shell -p ghcid --command 'ghcid --command "cabal repl lib:FMCt"' + ghcid --command 'ghcid --command "cabal repl lib:FMCt"' # Make the documentation and automatically refresh it haddock-watch: - ls **/*.hs | entr cabal new-haddock --haddock-all + ls **/* | entr cabal v2-haddock executables # Reformat all the code according to fourmolu.yaml reformat: ~/.local/bin/fourmolu --mode inplace $$(git ls-tree -r --full-tree --name-only HEAD | grep -e ".*\.hs") -# Make the documentation -haddock-generate: - cabal new-haddock && \ - firefox ./dist-newstyle/build/x86_64-linux/ghc-8.6.5/FMCt-0.1.0.0/doc/html/FMCt/index.html +documentation: + nix-shell --command "cabal v2-haddock executables"