20 lines
727 B
Makefile
20 lines
727 B
Makefile
SHELL := /usr/bin/env bash
|
|
|
|
.PHONY: hoogle format usage
|
|
|
|
usage:
|
|
@echo "usage: make <command> [OPTIONS]"
|
|
@echo
|
|
@echo "Available commands:"
|
|
@echo " hoogle -- Start local hoogle"
|
|
@echo " format -- Format the project"
|
|
|
|
HOOGLE_PORT=8081
|
|
hoogle:
|
|
hoogle server --local --port $(HOOGLE_PORT) > /dev/null &
|
|
|
|
FORMAT_EXTENSIONS := -o -XQuasiQuotes -o -XTemplateHaskell -o -XTypeApplications -o -XImportQualifiedPost -o -XPatternSynonyms -o -XOverloadedRecordDot
|
|
format:
|
|
find -name '*.hs' -not -path './dist-*/*' | xargs fourmolu $(FORMAT_EXTENSIONS) -m inplace
|
|
git ls-tree -r HEAD --full-tree --name-only | grep -E '.*\.nix' | xargs nixfmt
|
|
git ls-tree -r HEAD --full-tree --name-only | grep -E '.*\.cabal' | xargs cabal-fmt -i
|