Skip to content

Commit d7da6e4

Browse files
committed
Build echidna with GHC 9.8
1 parent 4a38578 commit d7da6e4

File tree

6 files changed

+24
-21
lines changed

6 files changed

+24
-21
lines changed

Diff for: flake.lock

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: flake.nix

+17-14
Original file line numberDiff line numberDiff line change
@@ -38,22 +38,25 @@
3838
ncurses-static = pkgsStatic.ncurses.override { enableStatic = true; };
3939

4040
hsPkgs = ps :
41-
ps.haskellPackages.override {
41+
ps.haskell.packages.ghc98.override {
4242
overrides = hfinal: hprev: {
43-
with-utf8 =
44-
if (with ps.stdenv; hostPlatform.isDarwin && hostPlatform.isx86)
45-
then ps.haskell.lib.compose.overrideCabal (_ : { extraLibraries = [ps.libiconv]; }) hprev.with-utf8
46-
else hprev.with-utf8;
47-
# TODO: temporary fix for static build which is still on 9.4
48-
witch = ps.haskell.lib.doJailbreak hprev.witch;
43+
with-utf8 = ps.haskell.lib.compose.overrideCabal (drv: {
44+
version = "1.1.0.0";
45+
src = pkgs.fetchFromGitHub {
46+
owner = "serokell";
47+
repo = "haskell-with-utf8";
48+
rev = "cf6e31475da3d9f54439650a70170819daa35f54";
49+
sha256 = "sha256-hxUiZbbcA6RvrVgGk4Vbt/rZT6wnBF3bfYbbQflzQ24=";
50+
};
51+
}) hprev.with-utf8;
4952
};
5053
};
5154

5255
hevm = pkgs: pkgs.lib.pipe ((hsPkgs pkgs).callCabal2nix "hevm" (pkgs.fetchFromGitHub {
5356
owner = "ethereum";
5457
repo = "hevm";
55-
rev = "443c9040f6a8bde7d8b2cfafd99c0cb7dd7d049f";
56-
sha256 = "sha256-IC/q+2SJoyDansmbTHXfkKFfnhmMy97G13aTPNOkR30=";
58+
rev = "53bccde13eeb6712eb9bc1d99b53529614a33690";
59+
sha256 = "sha256-sd7DEWz7hrs8AO+0juFz5S7Y5l/cWmQmullFeJH7FeE=";
5760
}) { secp256k1 = pkgs.secp256k1; })
5861
([
5962
pkgs.haskell.lib.compose.dontCheck
@@ -65,7 +68,7 @@
6568
# FIXME: figure out solc situation, it conflicts with the one from
6669
# solc-select that is installed with slither, disable tests in the meantime
6770
haskell.lib.compose.dontCheck
68-
(haskell.lib.compose.addTestToolDepends [ haskellPackages.hpack slither-analyzer solc ])
71+
(haskell.lib.compose.addTestToolDepends [ (hsPkgs pkgs).hpack slither-analyzer solc ])
6972
(haskell.lib.compose.disableCabalFlag "static")
7073
]);
7174

@@ -148,17 +151,17 @@
148151
packages.echidna-redistributable = echidnaRedistributable;
149152

150153
devShell = with pkgs;
151-
haskellPackages.shellFor {
154+
(hsPkgs pkgs).shellFor {
152155
packages = _: [ (echidna pkgs) ];
153156
shellHook = ''
154157
hpack
155158
'';
156159
buildInputs = [
157160
solc
158161
slither-analyzer
159-
haskellPackages.hlint
160-
haskellPackages.cabal-install
161-
haskellPackages.haskell-language-server
162+
(hsPkgs pkgs).hlint
163+
(hsPkgs pkgs).cabal-install
164+
(hsPkgs pkgs).haskell-language-server
162165
];
163166
withHoogle = true;
164167
};

Diff for: lib/Echidna/Campaign.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ import Echidna.Types.Config
4848
import Echidna.Types.Signature (FunctionName)
4949
import Echidna.Types.Test
5050
import Echidna.Types.Test qualified as Test
51-
import Echidna.Types.Tx (TxCall(..), Tx(..), call)
51+
import Echidna.Types.Tx (TxCall(..), Tx(..))
5252
import Echidna.Utility (getTimestamp)
5353

5454
instance MonadThrow m => MonadThrow (RandT g m) where

Diff for: lib/Echidna/Exec.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import Echidna.Types (ExecException(..), Gas, fromEVM, emptyAccount)
4040
import Echidna.Types.Config (Env(..), EConfig(..), UIConf(..), OperationMode(..), OutputFormat(Text))
4141
import Echidna.Types.Coverage (CoverageInfo)
4242
import Echidna.Types.Solidity (SolConf(..))
43-
import Echidna.Types.Tx (TxCall(..), Tx, TxResult(..), call, dst, initialTimestamp, initialBlockNumber, getResult)
43+
import Echidna.Types.Tx (TxCall(..), Tx(call, dst), TxResult(..), initialTimestamp, initialBlockNumber, getResult)
4444
import Echidna.Utility (getTimestamp, timePrefix)
4545

4646
-- | Broad categories of execution failures: reversions, illegal operations, and ???.

Diff for: src/test/Common.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ import Echidna.Types.Campaign
5050
import Echidna.Types.Signature (ContractName)
5151
import Echidna.Types.Solidity (SolConf(..))
5252
import Echidna.Types.Test
53-
import Echidna.Types.Tx (Tx(..), TxCall(..), call)
53+
import Echidna.Types.Tx (Tx(..), TxCall(..))
5454
import Echidna.Types.World (World(..))
5555

5656
import EVM.Solidity (Contracts(..), BuildOutput(..), SolcContract(..))

Diff for: stack.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
resolver: lts-22.34
1+
resolver: nightly-2024-10-21
22

33
packages:
44
- '.'

0 commit comments

Comments
 (0)