Name: haskell-mega-repo
Owner: Futurice
Description: Sometimes you need to make a change across the package boundaries
Created: 2015-09-16 06:06:42.0
Updated: 2018-05-23 09:54:18.0
Pushed: 2018-05-23 09:54:18.0
Homepage: null
Size: 34306
Language: Haskell
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Sometimes you need to make a change across the package boundaries
git clone --recursive git@github.com:futurice/haskell-mega-repo.git
git submodule update --init
brew install fftw pkg-config python3
sudo make install ubuntu-dependencies
apt-get install ghc-8.2.2 cabal-install-head
curl -sL https://haskell.futurice.com/haskell-on-macos.py | python3 - --make-dirs --paths.d --ghc-alias=8.2.2 --cabal-alias=head install ghc-8.0.2 ghc-8.2.2 cabal-install-head
cabal new-run theme-app-server
We use new-
commands, e.g.
cabal new-repl theme-app
to run GHCi repl in the theme-app
library.cabal new-test dynmap-cache
to run tests of dynmap-cache
.Haskell's optparse-applicative
based cli interfaces support auto completion.
If you use oh my zsh, then you have most things set-up already, you only need to
-repo-tool --zsh-completion-script $(which mega-repo-tool) > $HOME/.oh-my-zsh/completions/_mega-repo-tool
Install mega-repo-tool
from the repo.
mega-repo-tool build-docker <app-name>
, for example
mega-repo-tool build-docker checklist
.
If the tool instructs you to run some docker commands, then do it and re-run the build-docker command.
Update external gitmodules:
submodule foreach git checkout master
submodule foreach git pull
-repo-tool packdeps
-repo-tool stats
repo-tool dot
outdated
submodule foreach git checkout master
-p $(find . -name stack-lts-3.yaml)
K_YAML=stack-lts-3.yaml stack test --pedantic
if really want to test each package separately
rt STACK_YAML=stack-lts-3.yaml
i in favicon-app flowdock-grep; do echo $i; cd $i; stack test --pedantic; cd ..; done
mmit each package changes...
The packages can be divided into two groups: applications and libraries. The characteristics of these groups differ, so we apply different guidelines
We adhere to Johan Tibell's styleguide.
We use stylish-haskell.
Example stylish-haskell.yaml
.
Packages have to be buildable with -Wall -Werror
with some of the supported
GHCs (currently usually 8.0.2).
See ghccaniuse. Don't use extensions,
which aren't supported by three or four GHC releases, i.e. using DataKinds
and other type-system extensions are ok (required by e.g. servant
anyway).
For applications, new and straight-forward extensions like DeriveAnyClass
,
PartialTypeSignatures
, or upcoming ApplicativeDo
, StrictData
or
SignatureSections
are ok as well. However, their usage isn't an end in
itself.
Also of TupleSections
and RecordWildCards
are ok.
In fact we (should) use following set of default-extensions
:
fault-extensions:
- DeriveDataTypeable
- DeriveFoldable
- DeriveFunctor
- DeriveGeneric
- DeriveTraversable
- NoImplicitPrelude
- ScopedTypeVariables
Don't use UnicodeSyntax
.
Use CPP
sparingly. If you can get away with compat package (e.g.
base-compat
). Some
warnings with other GHCs are ok.
Everything should be compilable with the last three releases of GHC.
We don't apply the three release policy for the applications. It's enough that we can compile applications with some recent GHC version (currently 8.0.2).
For libraries we aim to support the last three GHC versions, but this doesn't apply to this repository, only for submodules.