Skip to content

Commit

Permalink
Use cabal multi repl
Browse files Browse the repository at this point in the history
This change uses haskell/cabal#8726 .
  • Loading branch information
TristanCacqueray committed Aug 20, 2023
1 parent 396528f commit aefb166
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,6 @@ To work on this project you need a Haskell toolchain: [get-started](https://www.

Run the `./bin/run-tests` script to validate a commit.

Run the test through ghcid with: `./bin/run-ghcid Main.main`.

Setup binary cache with: `nix run nixpkgs/release-22.11#cachix use haskell-platform`.
3 changes: 3 additions & 0 deletions bin/repl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh -e

exec cabal repl --enable-multi-repl lib:butler lib:butler-desktop test:spec $*
2 changes: 1 addition & 1 deletion bin/run-ghcid
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/sh
nix develop --command ghcid --command "cabal repl butler-desktop" -W --test "${1:-ButlerDemos.multiDesktop}"
nix develop --command ghcid --command "./bin/repl" -W --test "${1:-ButlerDemos.multiDesktop}"
8 changes: 4 additions & 4 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
nixConfig.bash-prompt = "[nix(butler)] ";
inputs = {
hspkgs.url =
"github:podenv/hspkgs/30b0954150719797ba9fd5e8e1652a03604d823f";
"github:podenv/hspkgs/816d9e6d854152c13837daa1e1c89a987ef908df";
# "path:///srv/github.com/podenv/hspkgs";
};
outputs = { self, hspkgs }:
Expand Down Expand Up @@ -145,7 +145,7 @@
baseTools = with pkgs; [
cabal-fmt
nixfmt
cabal-install
cabal-multi-repl # TODO: Switch back to cabal-install when cabal-3.11 is released
hlint
tasty-discover
fourmolu
Expand Down

0 comments on commit aefb166

Please sign in to comment.