Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. PROJECT_NAME = <enter your project name here>
  2.  
  3. help: ## Print documentation
  4. @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
  5.  
  6. stylish-haskell: ## Apply stylish-haskell on all *.hs files
  7. @find . -type f -name "*.hs" -not -path '.git' -not -path '*.stack-work*' -print0 | xargs -0 stylish-haskell -i
  8.  
  9. ghci: ## Run repl
  10. @stack ghci $(PROJECT_NAME):lib --haddock-deps --ghci-options=-fobject-code
  11. ghcid: ## Run ghcid
  12. @ghcid --command "stack ghci $(PROJECT_NAME):lib --ghci-options=-fobject-code"
  13.  
  14. run-test: ## Build & run test
  15. @stack build --fast && \
  16. stack test --fast
  17.  
  18. test-ghci: ## Run repl on test suites
  19. @stack ghci $(PROJECT_NAME):lib $(PROJECT_NAME):test:$(PROJECT_NAME)-test
  20.  
  21. test-ghcid: ## Run ghcid on test suites
  22. @ghcid --command "stack ghci $(PROJECT_NAME):lib $(PROJECT_NAME):test:$(PROJECT_NAME)-test --ghci-options=-fobject-code"
  23.  
  24. .PHONY: stylish-haskell ghci ghcid runtest test-ghcid test-ghci help
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement