Functorrent can be build with Cabal sandbox or Nix.
Sandboxes give you per project independent containers, just like Python's virtualenv.
$ git clone https://github.com/vu3rdd/functorrent && cd functorrent
$ cabal sandbox init
$ cabal update
$ cabal install --only-dependencies --enable-tests
$ cabal build # binaries in ./dist/built/functorrent/*
``$ nix-shell``` at the root of the source code repo should drop you into a shell which has all the package dependencies installed.
$ nix-shell --pure
[...]
[nix-shell] $ cabal configure && cabal build