To compile and run the needed setup is relatively easy:
- Install stack with following instructions.
- Run
stack build - Run
stack exec chesskell-exe
The first build will take time due to how stack needs to download the compiler.
For development below is list of some tools.
- Haskell Language Server HIE Installing this will take LONG time so be prepared, for this project building the only with
make buildshould suffice instead ofmake build-all. There is a plugin for VSCode, Sublime, Atom, etc make it work. - Install hlint (optional, language server should install it)
- Listen and correct errors given by compiler and hlint, build and lint should not give any warnings.
- If when looking at a piece of code you think "I do not know how this works" or "This looks messy" always refactor!
- Make tests for pure code (look for HUnit for information) and manually test impure code.
- Run tests before committing
stack test. - Always annotate function signature.
- Always use strictest typeclass.
- Prefer to use haskels own functions instead of making own, even when trivial to implement.
- Refactor repeated chucks of code.
- Document exposed functions, do not document unexposed functions. Should they be complex and need documentation refer to step 2.
- Before merge write to changelog what was done.
Commits follow the following structure: TAG, COMPONENT: DESCRIPTION
Where tag describes the type of commit, component desicbes what part of program it affects and description descibes shortly what it does.
| TAG | Intrepretation |
|---|---|
| feat | Adds or alters functionality |
| bugfix | Corrects functionality to intended |
| dep | Adds a new dependancy |
| other | If not listed above |
Proces before merge is following
- Make a merge/pull request
- Inspect your own code first
- Clean code and refresh the request
- Get someonw else to check it, if not present check it yourself in 3 days.
- Fix issues and prepare to rebase and merge, instrcutions below.
git checkout feature-branch
git rebase master -i
git merge feature-branch --no-ffSome of the practices may change in time.