Skip to content

Commit

Permalink
Make it build with ghc-9.8
Browse files Browse the repository at this point in the history
  • Loading branch information
erikd committed Feb 6, 2024
1 parent 760a6f5 commit 1fe0c11
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 11 deletions.
10 changes: 9 additions & 1 deletion cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ repository cardano-haskell-packages
-- See CONTRIBUTING for information about these, including some Nix commands
-- you need to run if you change them
index-state:
, hackage.haskell.org 2024-02-06T15:14:59Z
, hackage.haskell.org 2024-02-06T21:51:39Z
, cardano-haskell-packages 2024-02-06T15:25:20Z

packages:
Expand Down Expand Up @@ -43,3 +43,11 @@ write-ghc-environment-files: always
-- IMPORTANT
-- Do NOT add more source-repository-package stanzas here unless they are strictly
-- temporary! Please read the section in CONTRIBUTING about updating dependencies.

source-repository-package
type: git
location: https://github.com/IntersectMBO/cardano-api
tag: bead0de1fd9e0b8b33189906d9b66ef6debbed08
--sha256: 1x2in2m1hqd48qi280900zrzf9irmipjqilw0vaqvrbzbh4pgxh8
subdir:
cardano-api
10 changes: 5 additions & 5 deletions cardano-cli/cardano-cli.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ common project-config
default-language: Haskell2010

default-extensions: OverloadedStrings
build-depends: base >= 4.14 && < 4.19
build-depends: base >= 4.14 && < 4.20

ghc-options: -Wall
-Wcompat
Expand Down Expand Up @@ -227,9 +227,9 @@ library
, microlens
, network
, optparse-applicative-fork
, ouroboros-consensus >= 0.13
, ouroboros-consensus-cardano >= 0.11
, ouroboros-consensus-protocol >= 0.6.0.0
, ouroboros-consensus >= 0.15
, ouroboros-consensus-cardano >= 0.13
, ouroboros-consensus-protocol >= 0.7
, ouroboros-network-api
, ouroboros-network-protocols
, parsec
Expand Down Expand Up @@ -345,7 +345,7 @@ test-suite cardano-cli-golden
, directory
, extra
, filepath
, hedgehog ^>= 1.3
, hedgehog ^>= 1.4
, hedgehog-extras ^>= 0.6.0.1
, regex-compat
, regex-tdfa
Expand Down
7 changes: 3 additions & 4 deletions cardano-cli/src/Cardano/CLI/Parser.hs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ readerFromAttoParser p =
eDNSName :: String -> Either String ByteString
eDNSName str =
-- We're using 'Shelley.textToDns' to validate the string.
let dnsNameText = Text.pack str
in case Shelley.textToDns (Text.length dnsNameText) dnsNameText of
Nothing -> Left $ "DNS name is more than 64 bytes: " <> str
Just dnsName -> Right . Text.encodeUtf8 . Shelley.dnsToText $ dnsName
case Shelley.textToDns 100 (Text.pack str) of
Nothing -> Left $ "DNS name is more than 64 bytes: " <> str
Just dnsName -> Right . Text.encodeUtf8 . Shelley.dnsToText $ dnsName
1 change: 1 addition & 0 deletions cardano-cli/src/Cardano/CLI/Read.hs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ import Data.Word
import GHC.IO.Handle (hClose, hIsSeekable)
import GHC.IO.Handle.FD (openFileBlocking)
import qualified Options.Applicative as Opt
-- import Prettyprinter (vsep)
import System.IO (IOMode (ReadMode))

-- Metadata
Expand Down
2 changes: 1 addition & 1 deletion cardano-cli/src/Cardano/CLI/Types/Common.hs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ import qualified Cardano.Chain.Slotting as Byron
import qualified Cardano.Ledger.BaseTypes as L
import qualified Cardano.Ledger.Crypto as Crypto
import qualified Cardano.Ledger.SafeHash as L
import Cardano.Ledger.Shelley.API (PoolParams (..))
import Cardano.Ledger.PoolParams (PoolParams (..))

import Data.Aeson (FromJSON (..), ToJSON (..), object, pairs, (.=))
import qualified Data.Aeson as Aeson
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import Cardano.CLI.Types.Errors.StakePoolCmdError

import Control.Exception (IOException)
import Data.Text (Text)
-- import Prettyprinter

data GenesisCmdError
= GenesisCmdAesonDecodeError !FilePath !Text
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import Cardano.Api.Shelley

import Ouroboros.Consensus.Cardano.Block (EraMismatch)

-- import Prettyprinter

data GovernanceQueryError
= GovernanceQueryWriteFileError !(FileError ())
| GovernanceQueryAcqireFailureError !AcquiringFailure
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import Cardano.Api.Pretty
import Cardano.CLI.Types.Errors.NodeEraMismatchError
import Ouroboros.Consensus.Cardano.Block (EraMismatch (..))

-- import Prettyprinter ((<+>))

-- | An error that can occur while querying a node's local state.
newtype QueryCmdLocalStateQueryError
Expand Down

0 comments on commit 1fe0c11

Please sign in to comment.