Skip to content

Latest commit

 

History

History
97 lines (64 loc) · 2.47 KB

DEVELOPMENT.md

File metadata and controls

97 lines (64 loc) · 2.47 KB

Development

Requirements

  • Nix

  • We recommend that you make use of Cachix to speed up your builds.

    Once you have installed cachix, configure it to use this project's cache:

    cachix use funflow

Development environment

A shell.nix file is available to provide with the minimum environment to develop and build the library.

nix-shell shell.nix

A shell-stack.nix file is available to provide the suitable environment to build the project, which is the environment in which stack makes its builds.

A hie.yaml file is available at the root of the project to use Haskell Language Server. HLS can be used with VS Code/vim/emacs to improve the development experience.

VS Code

Requirements:

Install and start Docker

For tasks like running tests and executing some of the tutorials, Docker should be up and running on your machine. Check out the official Docker website for more about installation, and perhaps about the Docker daemon.

Build with stack

Build the funflow library:

stack build funflow

Run tests:

stack test funflow

CI

Updating the Nix build

Funflow uses a Nix build based on haskell.nix for CI.

If you make major changes, such as updating the stackage resolver, you may need to move to a newer version of nixpkgs and the haskell.nix tooling:

./nix/update-nixpkgs.sh
./nix/regenerate.sh

Build locally

Build the library:

nix-build nix -A funflow

Run the tests:

(cd funflow && "$(nix-build ../nix -A funflow-tests)/bin/test-funflow")

Build the API docs to a result-api-docs folder:

nix-build -o result-api-docs api-docs