Skip to content

Commit

Permalink
Fix nix compilation issues
Browse files Browse the repository at this point in the history
  • Loading branch information
carbolymer committed Jul 20, 2023
1 parent 2e3a3e5 commit 2cb249d
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ghc: ["8.10.7", "9.2.7"]
ghc: ["8.10.7", "9.2.7", "9.6.2"]
cabal: ["3.10.1.0"]
os: [ubuntu-latest, macos-latest, windows-latest]

Expand Down Expand Up @@ -48,14 +48,14 @@ jobs:
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}

- name: Install system dependencies
uses: input-output-hk/actions/base@latest
with:
use-sodium-vrf: true # default is true

- uses: actions/checkout@v3

- name: Cabal update
run: cabal update

Expand Down
1 change: 0 additions & 1 deletion cardano-cli/cardano-cli.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ library
, bytestring
, canonical-json
, cardano-api ^>= 8.8.1
, cardano-api:internal ^>= 8.8.1
, cardano-binary
, cardano-crypto
, cardano-crypto-class >= 2.1.1
Expand Down
8 changes: 4 additions & 4 deletions cardano-cli/src/Cardano/CLI/Run/Legacy/Address.hs
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ runAddressKeyGenToFile fmt kt vkf skf = case kt of

generateAndWriteByronKeyFiles
:: Key keyrole
#if __GLASGOW_HASKELL__ >= 902
-- GHC 8.10 considers the HasTypeProxy constraint redundant but ghc-9.2 and above complains if its
#if __GLASGOW_HASKELL__ >= 940
-- GHC 8.10 considers the HasTypeProxy constraint redundant but ghc-9.4 and above complains if its
-- not present.
=> HasTypeProxy keyrole
#endif
Expand All @@ -93,8 +93,8 @@ generateAndWriteByronKeyFiles asType vkf skf = do

generateAndWriteKeyFiles
:: Key keyrole
#if __GLASGOW_HASKELL__ >= 902
-- GHC 8.10 considers the HasTypeProxy constraint redundant but ghc-9.2 and above complains if its
#if __GLASGOW_HASKELL__ >= 940
-- GHC 8.10 considers the HasTypeProxy constraint redundant but ghc-9.4 and above complains if its
-- not present.
=> HasTypeProxy keyrole
#endif
Expand Down
11 changes: 10 additions & 1 deletion cardano-cli/src/Cardano/CLI/Run/Legacy/Genesis.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
Expand Down Expand Up @@ -458,7 +459,15 @@ runGenesisCreate
toSKeyJSON :: Key a => SigningKey a -> ByteString
toSKeyJSON = LBS.toStrict . textEnvelopeToJSON Nothing

toVkeyJSON :: (Key a, HasTypeProxy a) => SigningKey a -> ByteString
toVkeyJSON ::
#if __GLASGOW_HASKELL__ >= 940
-- GHC 8.10 considers the HasTypeProxy constraint redundant but ghc-9.4 and above complains if its
-- not present.
(Key a, HasTypeProxy a) =>
#else
(Key a) =>
#endif
SigningKey a -> ByteString
toVkeyJSON = LBS.toStrict . textEnvelopeToJSON Nothing . getVerificationKey

toVkeyJSON' :: Key a => VerificationKey a -> ByteString
Expand Down
4 changes: 2 additions & 2 deletions cardano-cli/src/Cardano/CLI/Types/Key.hs
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@ readVerificationKeyOrHashOrTextEnvFile asType verKeyOrHashOrFile =
VerificationKeyHash vkHash -> pure (Right vkHash)

generateKeyPair ::
#if __GLASGOW_HASKELL__ >= 902
-- GHC 8.10 considers the HasTypeProxy constraint redundant but ghc-9.2 and above complains if its
#if __GLASGOW_HASKELL__ >= 940
-- GHC 8.10 considers the HasTypeProxy constraint redundant but ghc-9.4 and above complains if its
-- not present.
(Key keyrole, HasTypeProxy keyrole) =>
#else
Expand Down

0 comments on commit 2cb249d

Please sign in to comment.