Skip to content

Commit 3129c94

Browse files
committed
Make it build with ghc-9.6
Co-Authored: Nadia Yvette Chambers <nadia.chambers@iohk.io>
1 parent 296de58 commit 3129c94

File tree

41 files changed

+94
-54
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+94
-54
lines changed

bench/cardano-topology/cardano-topology.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ license-files: LICENSE
1515
build-type: Simple
1616

1717
common project-config
18-
build-depends: base >= 4.14 && < 4.17
18+
build-depends: base >= 4.14 && < 5
1919
default-language: Haskell2010
2020
default-extensions: NoImplicitPrelude
2121
ghc-options: -Wall

bench/locli/locli.cabal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ common project-config
1818
default-language: Haskell2010
1919
default-extensions: BangPatterns
2020
BlockArguments
21+
DataKinds
2122
DeriveGeneric
2223
DerivingStrategies
2324
DerivingVia
@@ -38,7 +39,6 @@ common project-config
3839
TupleSections
3940
TypeApplications
4041
TypeFamilies
41-
TypeInType
4242
ViewPatterns
4343

4444
ghc-options: -Wall
@@ -49,7 +49,7 @@ common project-config
4949
-Wcompat
5050
-Wno-all-missed-specialisations
5151

52-
build-depends: base >= 4.14 && < 4.17,
52+
build-depends: base >= 4.14 && < 5,
5353

5454
if os(windows)
5555
buildable: False

bench/locli/src/Cardano/Analysis/API/Field.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{-# LANGUAGE TypeInType #-}
1+
{-# LANGUAGE PolyKinds #-}
22
{-# LANGUAGE ScopedTypeVariables #-}
33
module Cardano.Analysis.API.Field (module Cardano.Analysis.API.Field) where
44

bench/locli/src/Cardano/Analysis/API/Ground.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{-# LANGUAGE PolyKinds #-}
12
{-# LANGUAGE DeriveAnyClass #-}
23
{-# LANGUAGE GeneralisedNewtypeDeriving #-}
34
{-# OPTIONS_GHC -Wno-orphans #-}
@@ -67,7 +68,7 @@ instance ToJSONKey Hash where
6768
instance FromJSONKey Hash where
6869
fromJSONKey = FromJSONKeyText (Hash . fromText)
6970

70-
newtype Count a = Count { unCount :: Int }
71+
newtype Count (a :: k) = Count { unCount :: Int }
7172
deriving (Eq, Generic, Ord, Show)
7273
deriving newtype (Divisible, FromJSON, Num, Real, ToJSON)
7374
deriving anyclass NFData

bench/locli/src/Cardano/Analysis/API/Metrics.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{-# LANGUAGE PolyKinds #-}
12
{-# LANGUAGE EmptyDataDeriving #-}
23
{-# LANGUAGE GeneralisedNewtypeDeriving #-}
34
{-# LANGUAGE UndecidableInstances #-}

bench/locli/src/Cardano/Analysis/API/Types.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
{-# LANGUAGE PolyKinds #-}
12
{-# LANGUAGE DeriveAnyClass #-}
23
{-# LANGUAGE GeneralisedNewtypeDeriving #-}
34
{-# LANGUAGE QuantifiedConstraints #-}
45
{-# LANGUAGE UndecidableInstances #-}
5-
{-# LANGUAGE TypeInType #-}
66
{-# LANGUAGE TypeSynonymInstances #-}
77
{-# OPTIONS_GHC -Wno-name-shadowing -Wno-orphans #-}
88
module Cardano.Analysis.API.Types (module Cardano.Analysis.API.Types) where

bench/locli/src/Cardano/Analysis/BlockProp.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import Data.Set qualified as Set
3535
import Data.Text qualified as T
3636
import Data.Text.Short (toText)
3737
import Data.Tuple (swap)
38+
import Data.Tuple.Extra (both, fst3, snd3, thd3)
3839
import Data.Vector (Vector)
3940
import Data.Vector qualified as Vec
4041

bench/locli/src/Cardano/Command.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import Data.Text qualified as T
1515
import Data.Text.Lazy qualified as LT
1616
import Data.Text.Short (toText)
1717
import Data.Time.Clock
18+
import Data.Tuple.Extra (both)
1819
import Options.Applicative
1920
import Options.Applicative qualified as Opt
2021

bench/locli/src/Cardano/Render.hs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
{-# LANGUAGE CPP #-}
12
{-# LANGUAGE ScopedTypeVariables #-}
2-
{-# LANGUAGE TypeInType #-}
3+
{-# LANGUAGE TypeOperators #-}
34

45
{- HLINT ignore "Use concatMap" -}
56
{- HLINT ignore "Use fromMaybe" -}
@@ -14,6 +15,9 @@ import Data.List (dropWhileEnd)
1415
import Data.Map.Strict qualified as Map
1516
import Data.Text qualified as T
1617
import Data.Text.Lazy qualified as LT
18+
#if __GLASGOW_HASKELL__ >= 906
19+
import Data.Type.Equality (type (~))
20+
#endif
1721
import Options.Applicative qualified as Opt
1822

1923
import Data.CDF
@@ -22,7 +26,6 @@ import Cardano.Org
2226
import Cardano.Util
2327
import Cardano.Analysis.API
2428

25-
2629
data RenderConfig
2730
= RenderConfig
2831
{ rcFormat :: RenderFormat
@@ -361,7 +364,7 @@ renderAnalysisCDFs a fieldSelr _c2a centileSelr rc@RenderConfig{rcFormat=AsOrg}
361364
, tExtended = True
362365
, tApexHeader = Just "centile"
363366
, tColumns = fields' <&> fmap (T.intercalate ":") . renderFieldCentiles x cdfSamplesProps
364-
, tRowHeaders = percSpecs <&> T.take 6 . T.pack . printf "%.4f" . unCentile
367+
, tRowHeaders = percSpecs <&> (T.take 6 . T.pack . printf "%.4f") . unCentile
365368
, tSummaryHeaders = ["avg", "samples"]
366369
, tSummaryValues = [ fields' <&>
367370
\f@Field{..} ->

bench/locli/src/Cardano/Report.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
{-# LANGUAGE DataKinds #-}
2+
{-# LANGUAGE PolyKinds #-}
13
{-# LANGUAGE GeneralisedNewtypeDeriving #-}
24
{-# LANGUAGE OverloadedStrings #-}
35
{-# LANGUAGE ScopedTypeVariables #-}
4-
{-# LANGUAGE TypeInType #-}
56
{-# OPTIONS_GHC -Wno-orphans #-}
67
module Cardano.Report
78
( module Cardano.Report
@@ -24,6 +25,7 @@ import System.Environment (lookupEnv)
2425
import Text.EDE hiding (Id)
2526

2627
import Data.CDF
28+
import Data.Tuple.Extra (fst3)
2729
import Cardano.Util
2830
import Cardano.Analysis.API
2931
import Cardano.Analysis.Summary

0 commit comments

Comments
 (0)