Installation

Non-Haskell dependencies

Linux

Haskell dependencies

You can do this either the cabal way, or the stack way.

cabal way

For whatever reason cabal doesn't install binary dependencies automatically, and it doesn't know how to do dependencies between them, so first run:

# These must be separate command lines!  Cabal is not smart about binaries.
cabal install alex happy
cabal install c2hs cpphs

I think when I can rely on Cabal >=2.0 and nix-style builds, cabal install will finally handle this automatically.

To install the needed haskell dependencies, type:

cabal sandbox init  # if you're afraid to screw up your haskell installation
cp data/cabal.config . # if you want to use the same versions as I do
cabal install --only-dependencies

The actual build is with shake, but there's a dummy cabal file with just dependencies to make install easier.

If you want to build the documentation:

cabal install hscolour
my-package-manager install pandoc

You can also install pandoc with cabal but it has a ridiculous number of dependencies.

stack way

I don't use stack, but I added some basic support so hopefully this should work:

stack setup # install ghc, it's 8.0 or 8.4, right?
stack install alex happy c2hs cpphs
# Put ~/.local/bin in $PATH if stack warns you about that.
stack install --only-dependencies

From here on, you will need to export use_stack=t. Then when you run bin/mkmk and bin/mk, it will use stack path to find where to get the stack-flavored ghc and packages.

nix way

If you like nix, write me a nix expression. You could probably get this whole mess down to one command.

音, Im, Synth

These are all names for the incomplete offline synthesizer. It requires a bunch of extra dependencies. First you need more non-haskell dependencies. Get the -dev versions as usual:

Turn on enableIm in Local.ShakeConfig, and add a bunch more haskell deps:

cp data/all-deps.cabal karya.cabal
cp data/cabal.config.all-deps cabal.config # if you want my versions
cabal install --only-dependencies

Or, if you're doing it the stack way:

cp data/all-deps.cabal karya.cabal
vi stack.yaml # uncomment the stuff in there that says to

Misc

tools/run_profile expects ps2pdf in the path, which is part of ghostscript. It's fine if it's not, but you'll get ps instead of pdf. Help with heap profiling would be very welcome!