PROJECT=haskell-opentimestamps .PHONY: help help: ## print make targets @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' package: package.yaml hpack .PHONY: freeze freeze: ## Freeze dependencies cabal freeze .PHONY: clean clean: ## Clean project cabal clean .PHONY: build build: package ## Build project cabal build --enable-tests .PHONY: repl repl: package ## Repl with project pre-loaded cabal repl $(PROJECT) .PHONY: format format: ## Format Haskell source code fourmolu -i `ag -l --haskell` .PHONY: lint lint: ## Lint Haskell source code hlint `ag -l --haskell` .PHONY: ls ls: ## get path of executable cabal ls-bin $(PROJECT) .PHONY: run run: package ## run the project with cabal cabal run .PHONY: test test: package ## runs the unit test project cabal test $(PROJECT)-test --enable-tests --test-show-details=direct .PHONY: check check: ## runs cabal check cabal check .PHONY: sdist sdist: ## generate a distribution tarball cabal sdist # HOOGLE="http://localhost:4040" emacs & .PHONY: edit edit: ## Start editor emacs & # https://blog.ssanj.net/posts/2019-10-19-running-hoogle-locally-for-haskell-dev.html .PHONY: hoogledb hoogledb: ## Create local Hoogle database cabal-hoogle generate # stack hoogle -- generate --local # https://blog.ssanj.net/posts/2019-10-19-running-hoogle-locally-for-haskell-dev.html .PHONY: hoogle hoogle: ## Run local Hoogle server cabal-hoogle run -- server --local --port 4040 # stack hoogle -- server --local --port=4040