Skip to content

Commit 94591bb

Browse files
Upgrade to GHC 9.8
We also undo some hacks that were working around issues with the older GHC version: This reverts commit 5b63936. This reverts commit 3ff3d52.
1 parent aba75ae commit 94591bb

File tree

5 files changed

+366
-46
lines changed

5 files changed

+366
-46
lines changed

Simplicity.Haskell.nix

+5-17
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ mkDerivation, cabal-install, base, binary, cereal, lens-family, lib, MemoTrie, mtl, prettyprinter, QuickCheck, stdenv, split, tasty, tasty-hunit, tasty-quickcheck, tardis, unification-fd, vector }:
1+
{ mkDerivation, base, binary, cereal, lens-family, lib, MemoTrie, mtl, prettyprinter, QuickCheck, stdenv, split, tasty, tasty-hunit, tasty-quickcheck, tardis, unification-fd, vector }:
22
mkDerivation (rec {
33
pname = "Simplicity";
44
version = "0.0.0";
@@ -21,23 +21,11 @@ mkDerivation (rec {
2121
# testFlags = ["--quickcheck-replay=582534"];
2222

2323
# Cabal's haddock doesn't work for Backpack / internal libraries / modules reexports.
24-
# Under ghc8, the documenation generated is pretty badly broken.
25-
# Under ghc9, Setup.hs haddock simply crashes.
26-
#
27-
# To work around these issues we manually build the documentation using cabal haddock.
28-
# Even cabal haddock hardcodes links to internal modules that are reexported which is a problem.
29-
# To deal with that, we build directly into the $doc directly.
30-
# This isn't very great because the documenation isn't really in the right place, but the result is usable.
31-
doHaddock = false;
32-
enableSeparateDocOutput = true;
33-
buildTools = [ cabal-install ];
24+
# Until that is fix we manually generate some documentation pages
25+
haddockFlags = ["--haddock-option='--use-contents=index.html'"];
3426
postHaddock = ''
35-
CABAL_CONFIG=/dev/null CABAL_DIR=`pwd` env -u GHC_PACKAGE_PATH cabal --package-db=$packageConfDir configure --docdir=$doc/share/doc/${pname}-${version}
36-
CABAL_CONFIG=/dev/null CABAL_DIR=`pwd` env -u GHC_PACKAGE_PATH cabal --package-db=$packageConfDir haddock --distdir=$doc
37-
'';
38-
# Delete all cabal build material other than the documentation.
39-
postInstall = ''
40-
find $doc ! -path '*/doc/*' -delete ||:
27+
cp ${./manual-index.html} dist/doc/html/Simplicity/index.html
28+
cp ${./Simplicity-Primitive.html} dist/doc/html/Simplicity/Simplicity-Primitive.html
4129
'';
4230

4331
license = lib.licenses.mit;

Simplicity.cabal

+25-25
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,17 @@ library Simplicity-Core
5757
hs-source-dirs: Haskell/Core
5858
default-language: Haskell2010
5959
ghc-options: -O2
60-
build-depends: base >=4.9 && <4.18,
60+
build-depends: base >=4.9 && <4.20,
6161
binary >=0.7 && <0.9,
62-
bytestring >=0.10 && <0.12,
62+
bytestring >=0.10 && <0.13,
6363
containers >=0.5.10 && <0.7,
6464
cereal >=0.5 && <0.6,
6565
lens-family >=2.0 && <2.2,
66-
mtl >=2.2 && <2.3,
66+
mtl >=2.2 && <2.4,
6767
MemoTrie >=0.6 && <0.7,
6868
split >=0.2.3 && <0.3,
6969
tardis >=0.4.1 && <0.6,
70-
transformers >=0.5 && <0.6,
70+
transformers >=0.5 && <0.7,
7171
unification-fd >=0.10 && <0.12,
7272
vector >=0.12 && <0.14
7373

@@ -78,8 +78,8 @@ library Simplicity-Bitcoin
7878
default-language: Haskell2010
7979
ghc-options: -O2
8080
build-depends: Simplicity-Core,
81-
base >=4.9 && <4.18,
82-
bytestring >=0.10 && <0.12,
81+
base >=4.9 && <4.20,
82+
bytestring >=0.10 && <0.13,
8383
cereal >=0.5 && <0.6,
8484
vector >=0.12 && <0.14
8585

@@ -90,8 +90,8 @@ library Simplicity-Elements
9090
default-language: Haskell2010
9191
ghc-options: -O2
9292
build-depends: Simplicity-Core,
93-
base >=4.9 && <4.18,
94-
bytestring >=0.10 && <0.12,
93+
base >=4.9 && <4.20,
94+
bytestring >=0.10 && <0.13,
9595
cereal >=0.5 && <0.6,
9696
containers >=0.5.10 && <0.7,
9797
lens-family >=2.0 && <2.2,
@@ -113,13 +113,13 @@ library Simplicity-Indef
113113
default-language: Haskell2010
114114
ghc-options: -O2
115115
build-depends: Simplicity-Core,
116-
base >=4.9 && <4.18,
117-
bytestring >=0.10 && <0.12,
116+
base >=4.9 && <4.20,
117+
bytestring >=0.10 && <0.13,
118118
cereal >=0.5 && <0.6,
119119
containers >=0.5.10 && <0.7,
120120
lens-family >=2.0 && <2.2,
121-
mtl >=2.2 && <2.3,
122-
transformers >=0.5 && <0.6,
121+
mtl >=2.2 && <2.4,
122+
transformers >=0.5 && <0.7,
123123
unification-fd >=0.10 && <0.12,
124124
vector >=0.12 && <0.14
125125

@@ -206,8 +206,8 @@ library
206206
default-language: Haskell2010
207207
ghc-options: -O2
208208
build-depends: Simplicity-Core, Simplicity-Bitcoin, Simplicity-Elements, Simplicity-Indef,
209-
base >=4.9 && <4.18,
210-
bytestring >=0.10 && <0.12,
209+
base >=4.9 && <4.20,
210+
bytestring >=0.10 && <0.13,
211211
cereal >=0.5 && <0.6,
212212
containers >=0.5.10 && <0.7,
213213
lens-family >=2.0 && <2.2,
@@ -239,17 +239,17 @@ Test-Suite testsuite
239239
C-sources: C/rsort.c, C/dag.c, C/primitive/elements/primitive.c, C/bitstream.c
240240
Haskell/cbits/bitstream.c, Haskell/cbits/dag.c
241241
build-depends: Simplicity,
242-
base >=4.9 && <4.18,
243-
bytestring >=0.10 && <0.12,
242+
base >=4.9 && <4.20,
243+
bytestring >=0.10 && <0.13,
244244
cereal >=0.5 && <0.6,
245245
containers >=0.5.10 && <0.7,
246246
lens-family >=2.0 && <2.2,
247247
QuickCheck >=2.10 && <2.15,
248-
mtl >=2.2 && <2.3,
248+
mtl >=2.2 && <2.4,
249249
tasty >=0.11 && <1.5,
250250
tasty-hunit >=0.9 && <0.11,
251251
tasty-quickcheck >=0.8 && <0.11,
252-
transformers >=0.5 && <0.6,
252+
transformers >=0.5 && <0.7,
253253
vector >=0.12 && <0.14
254254

255255
executable GenPrecomputed
@@ -264,7 +264,7 @@ executable GenPrecomputed
264264
hs-source-dirs: Haskell-Generate
265265
default-language: Haskell2010
266266
build-depends: Simplicity,
267-
base >=4.9 && <4.18,
267+
base >=4.9 && <4.20,
268268
prettyprinter >=1.7 && <1.8,
269269
split >=0.2.3 && <0.3,
270270

@@ -281,9 +281,9 @@ executable GenPrimitive
281281
default-language: Haskell2010
282282
other-modules: NameWrangler
283283
build-depends: Simplicity,
284-
base >=4.9 && <4.18,
284+
base >=4.9 && <4.20,
285285
containers >=0.5.10 && <0.7,
286-
mtl >=2.2 && <2.3,
286+
mtl >=2.2 && <2.4,
287287
split >=0.2.3 && <0.3,
288288
unification-fd >=0.10 && <0.12,
289289

@@ -299,8 +299,8 @@ executable GenTests
299299
hs-source-dirs: Haskell-Generate
300300
default-language: Haskell2010
301301
build-depends: Simplicity,
302-
base >=4.9 && <4.18,
303-
bytestring >=0.10 && <0.12,
302+
base >=4.9 && <4.20,
303+
bytestring >=0.10 && <0.13,
304304
cereal >=0.5 && <0.6,
305305
lens-family >=2.0 && <2.2,
306306
split >=0.2.3 && <0.3,
@@ -319,9 +319,9 @@ executable GenRustJets
319319
other-modules: NameWrangler
320320
other-extensions: OverloadedStrings
321321
build-depends: Simplicity,
322-
base >=4.9 && <4.18,
322+
base >=4.9 && <4.20,
323323
containers >=0.5.10 && <0.7,
324324
prettyprinter >=1.7 && <1.8,
325325
split >=0.2.3 && <0.3,
326-
transformers >=0.5 && <0.6,
326+
transformers >=0.5 && <0.7,
327327
unification-fd >=0.10 && <0.12,

default.nix

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{ nixpkgs ? import <nixpkgs> {}
2-
, ghc ? "ghc94"
2+
, ghc ? "ghc98"
33
, coqPackages ? "coqPackages_8_16"
44
, production ? false
55
, secp256k1git ? null
@@ -15,7 +15,7 @@ let hp = nixpkgs.haskell.packages.${ghc};
1515
cp = nixpkgs.${coqPackages};
1616
in rec
1717
{
18-
haskell = haskellPackages.callPackage ./Simplicity.Haskell.nix { cabal-install = nixpkgs.cabal-install; };
18+
haskell = haskellPackages.callPackage ./Simplicity.Haskell.nix {};
1919

2020
haskellPackages = hp.override {
2121
overrides = self: super: {

0 commit comments

Comments
 (0)