Skip to content

Commit 76bfc6c

Browse files
committed
Fixes & Updates
* Use breakpoint instead of polysemy (for simplicity) * Apply fixes from input-output-hk/haskell.nix#2158
1 parent 60ed77d commit 76bfc6c

File tree

5 files changed

+66
-9
lines changed

5 files changed

+66
-9
lines changed

cabal.out

+51
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,58 @@
11
Resolving dependencies...
22
Build profile: -w ghc-9.8.1 -O1
33
In order, the following will be built (use -v for more details):
4+
- colour-2.3.6 (lib) (requires build)
5+
- prettyprinter-1.7.1 (lib) (requires build)
6+
- transformers-compat-0.7.2 (lib) (requires build)
7+
- ansi-terminal-types-0.11.5 (lib) (requires build)
8+
- ansi-terminal-1.0.2 (lib) (requires download & build)
9+
- prettyprinter-ansi-terminal-1.1.3 (lib) (requires build)
10+
- optparse-applicative-0.18.1.0 (lib) (requires build)
11+
- pretty-simple-4.1.2.0 (lib:pretty-simple) (requires download & build)
12+
- breakpoint-0.1.3.0 (lib) (requires download & build)
413
- test-0.1.0.0 (lib) (first run)
14+
Downloading ansi-terminal-1.0.2
15+
Starting colour-2.3.6 (lib)
16+
Starting transformers-compat-0.7.2 (lib)
17+
Starting prettyprinter-1.7.1 (lib)
18+
Downloaded ansi-terminal-1.0.2
19+
Downloading pretty-simple-4.1.2.0
20+
Downloaded pretty-simple-4.1.2.0
21+
Downloading breakpoint-0.1.3.0
22+
Building colour-2.3.6 (lib)
23+
Building transformers-compat-0.7.2 (lib)
24+
Building prettyprinter-1.7.1 (lib)
25+
Downloaded breakpoint-0.1.3.0
26+
Installing transformers-compat-0.7.2 (lib)
27+
Completed transformers-compat-0.7.2 (lib)
28+
Installing colour-2.3.6 (lib)
29+
Completed colour-2.3.6 (lib)
30+
Starting ansi-terminal-types-0.11.5 (lib)
31+
Building ansi-terminal-types-0.11.5 (lib)
32+
Installing ansi-terminal-types-0.11.5 (lib)
33+
Completed ansi-terminal-types-0.11.5 (lib)
34+
Starting ansi-terminal-1.0.2 (lib)
35+
Building ansi-terminal-1.0.2 (lib)
36+
Installing ansi-terminal-1.0.2 (lib)
37+
Completed ansi-terminal-1.0.2 (lib)
38+
Installing prettyprinter-1.7.1 (lib)
39+
Completed prettyprinter-1.7.1 (lib)
40+
Starting prettyprinter-ansi-terminal-1.1.3 (lib)
41+
Building prettyprinter-ansi-terminal-1.1.3 (lib)
42+
Installing prettyprinter-ansi-terminal-1.1.3 (lib)
43+
Completed prettyprinter-ansi-terminal-1.1.3 (lib)
44+
Starting optparse-applicative-0.18.1.0 (lib)
45+
Building optparse-applicative-0.18.1.0 (lib)
46+
Installing optparse-applicative-0.18.1.0 (lib)
47+
Completed optparse-applicative-0.18.1.0 (lib)
48+
Starting pretty-simple-4.1.2.0 (all, legacy fallback)
49+
Building pretty-simple-4.1.2.0 (all, legacy fallback)
50+
Installing pretty-simple-4.1.2.0 (all, legacy fallback)
51+
Completed pretty-simple-4.1.2.0 (all, legacy fallback)
52+
Starting breakpoint-0.1.3.0 (lib)
53+
Building breakpoint-0.1.3.0 (lib)
54+
Installing breakpoint-0.1.3.0 (lib)
55+
Completed breakpoint-0.1.3.0 (lib)
556
Configuring library for test-0.1.0.0..
657
Preprocessing library for test-0.1.0.0..
758
Building library for test-0.1.0.0..

default.nix

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
1-
{ system ? builtins.currentSystem }:
1+
{ system ? builtins.currentSystem, compiler-nix-name ? "ghc98" }:
22
let
33
sources = import ./nix/sources.nix;
44
haskell-nix = import sources."haskell.nix" { };
5+
56
pkgs = import sources.nixpkgs (haskell-nix.nixpkgsArgs // { inherit system; });
67

78
project = pkgs.haskell-nix.project' {
9+
inherit compiler-nix-name;
810
evalPackages = pkgs;
9-
compiler-nix-name = "ghc981";
1011
src = ./.;
12+
# fixes the build problem with ghc 9.8.1
13+
modules = [{
14+
reinstallableLibGhc = compiler-nix-name != "ghc98" && compiler-nix-name != "ghc981";
15+
}];
1116
};
17+
test = project.hsPkgs.test.components.library;
18+
1219
in
13-
{ test = project.hsPkgs.test.components.library; }
20+
{ inherit test pkgs; }

nix/sources.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
"homepage": "https://input-output-hk.github.io/haskell.nix",
66
"owner": "input-output-hk",
77
"repo": "haskell.nix",
8-
"rev": "a639d3ea067bb561a3a4b4a5d27249a9c5991ecd",
9-
"sha256": "0gwy39fz4l8zj2pjdhwf4v4qbwm39zynn0irw8r1rjk0bwswh7c5",
8+
"rev": "78cf6c49f8d9177eea746f51b961c684eb435aae",
9+
"sha256": "13rypm585hxd6f5m5bz68czdl6d2j0pal0a24bj90lq0fcmj2gcn",
1010
"type": "tarball",
11-
"url": "https://github.com/input-output-hk/haskell.nix/archive/a639d3ea067bb561a3a4b4a5d27249a9c5991ecd.tar.gz",
11+
"url": "https://github.com/input-output-hk/haskell.nix/archive/78cf6c49f8d9177eea746f51b961c684eb435aae.tar.gz",
1212
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
1313
},
1414
"nixpkgs": {

src/MyLib.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-}
1+
{-# OPTIONS_GHC -fplugin=Debug.Breakpoint #-}
22
module MyLib (someFunc) where
33

44
someFunc :: IO ()

test.cabal

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ build-type: Simple
55

66
library
77
exposed-modules: MyLib
8-
build-depends: base, polysemy, polysemy-plugin
9-
ghc-options: -Wall -fplugin=Polysemy.Plugin
8+
build-depends: base, breakpoint
109
hs-source-dirs: src
1110
default-language: Haskell2010

0 commit comments

Comments
 (0)