Skip to content

Commit 42b2ec1

Browse files
committed
Make CI happy
- Re-format files - Remove warning on unused import - Update hackageNix in flake.lock
1 parent ec7f8b8 commit 42b2ec1

File tree

17 files changed

+28
-29
lines changed

17 files changed

+28
-29
lines changed

docs/website/contents/for-developers/utxo-hd/migrating.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ $ snapshot-converter Legacy ./ledger/<slotno> LMDB ./ledger/<slotno>_lmdb cardan
9292
```
9393

9494
This will create a snapshot with the proper format for UTxO-HD. See [the UTxO-HD
95-
in depth document](./utxo-hd-in-depth.html#storing-snapshots) for more
95+
in depth document](./utxo-hd-in-depth#storing-snapshots) for more
9696
information on the contents of the different files in the snapshot.
9797

9898
If the snapshot does not have the expected structure or the backend for which it

flake.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ouroboros-consensus-cardano/app/snapshot-converter.hs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{-# LANGUAGE DataKinds #-}
22
{-# LANGUAGE DeriveAnyClass #-}
33
{-# LANGUAGE FlexibleContexts #-}
4-
{-# LANGUAGE NamedFieldPuns #-}
54
{-# LANGUAGE OverloadedStrings #-}
65
{-# LANGUAGE ScopedTypeVariables #-}
76
{-# LANGUAGE TupleSections #-}
@@ -57,13 +56,13 @@ data Format
5756
deriving (Show, Read)
5857

5958
data Config = Config
60-
{ from :: Format
59+
{ from :: Format
6160
-- ^ Which format the input snapshot is in
62-
, inpath :: FilePath
61+
, inpath :: FilePath
6362
-- ^ Path to the input snapshot
64-
, to :: Format
63+
, to :: Format
6564
-- ^ Which format the output snapshot must be in
66-
, outpath :: FilePath
65+
, outpath :: FilePath
6766
-- ^ Path to the output snapshot
6867
}
6968

ouroboros-consensus-cardano/src/shelley/Ouroboros/Consensus/Shelley/Node/Serialisation.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ import Ouroboros.Consensus.HardFork.History.EpochInfo
3434
import Ouroboros.Consensus.HardFork.Simple
3535
import Ouroboros.Consensus.HeaderValidation
3636
import Ouroboros.Consensus.Ledger.Query
37-
import Ouroboros.Consensus.Ledger.SupportsProtocol
3837
import Ouroboros.Consensus.Ledger.SupportsMempool (GenTxId)
38+
import Ouroboros.Consensus.Ledger.SupportsProtocol
3939
import Ouroboros.Consensus.Ledger.Tables (EmptyMK)
4040
import Ouroboros.Consensus.Node.Run
4141
import Ouroboros.Consensus.Node.Serialisation

ouroboros-consensus-cardano/src/unstable-cardano-tools/Cardano/Tools/DBAnalyser/Types.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ module Cardano.Tools.DBAnalyser.Types (module Cardano.Tools.DBAnalyser.Types) wh
55

66
import Data.Word
77
import Ouroboros.Consensus.Block
8-
import Ouroboros.Consensus.Util (Flag)
98

109
data SelectDB =
1110
SelectImmutableDB (WithOrigin SlotNo)

ouroboros-consensus-cardano/src/unstable-shelley-testlib/Test/Consensus/Shelley/Generators.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ instance CanMock proto era=> Arbitrary (ShelleyTip proto era) where
196196
instance Arbitrary ShelleyTransition where
197197
arbitrary = ShelleyTransitionInfo <$> arbitrary
198198

199-
instance (Arbitrary (InstantStake era), CanMock proto era)
199+
instance (Arbitrary (InstantStake era), CanMock proto era)
200200
=> Arbitrary (LedgerState (ShelleyBlock proto era) EmptyMK) where
201201
arbitrary = ShelleyLedgerState
202202
<$> arbitrary

ouroboros-consensus/ouroboros-consensus.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,8 +706,8 @@ test-suite storage-test
706706
Test.Ouroboros.Storage.ImmutableDB.StateMachine
707707
Test.Ouroboros.Storage.LedgerDB
708708
Test.Ouroboros.Storage.LedgerDB.Serialisation
709-
Test.Ouroboros.Storage.LedgerDB.Snapshots
710709
Test.Ouroboros.Storage.LedgerDB.SnapshotPolicy
710+
Test.Ouroboros.Storage.LedgerDB.Snapshots
711711
Test.Ouroboros.Storage.LedgerDB.StateMachine
712712
Test.Ouroboros.Storage.LedgerDB.StateMachine.TestBlock
713713
Test.Ouroboros.Storage.LedgerDB.V1.BackingStore

ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/Ledger.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1153,7 +1153,7 @@ extendTables st =
11531153

11541154

11551155
injectHardForkTxOutDefault ::
1156-
SListI xs
1156+
SListI xs
11571157
=> Index xs x
11581158
-> TxOut (LedgerState x)
11591159
-> DefaultHardForkTxOut xs

ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/Ledger/Query.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121

2222
module Ouroboros.Consensus.HardFork.Combinator.Ledger.Query (
2323
BlockQuery (..)
24-
, HardForkNodeToClientVersion (..)
2524
, BlockSupportsHFLedgerQuery (..)
25+
, HardForkNodeToClientVersion (..)
2626
, HardForkQueryResult
2727
, QueryAnytime (..)
2828
, QueryHardFork (..)

ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Ledger/Query.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ import Codec.Serialise (Serialise)
4848
import Codec.Serialise.Class (decode, encode)
4949
import Control.Exception (throw)
5050
import Data.Kind (Type)
51-
import Data.Typeable (Typeable)
5251
import qualified Data.Map.Strict as Map
5352
import Data.Maybe (isJust)
5453
import Data.Singletons
5554
import Data.SOP.BasicFunctors
55+
import Data.Typeable (Typeable)
5656
import Ouroboros.Consensus.Block.Abstract (CodecConfig)
5757
import Ouroboros.Consensus.BlockchainTime (SystemStart)
5858
import Ouroboros.Consensus.Config
@@ -187,8 +187,8 @@ class
187187
-- https://ouroboros-consensus.cardano.intersectmbo.org/docs/for-developers/QueryVersioning/. In
188188
-- particular this function implements the check described in
189189
-- https://ouroboros-consensus.cardano.intersectmbo.org/docs/for-developers/QueryVersioning/#checks.
190-
blockQueryIsSupportedOnVersion ::
191-
BlockQuery blk fp result
190+
blockQueryIsSupportedOnVersion ::
191+
BlockQuery blk fp result
192192
-> BlockNodeToClientVersion blk
193193
-> Bool
194194

ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Storage/LedgerDB/Snapshots.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ data SnapshotPolicy = SnapshotPolicy {
453453
-- the next snapshot, we delete the oldest one, leaving the middle
454454
-- one available in case of truncation of the write. This is
455455
-- probably a sane value in most circumstances.
456-
onDiskNumSnapshots :: Word
456+
onDiskNumSnapshots :: Word
457457

458458
-- | Should we write a snapshot of the ledger state to disk?
459459
--
@@ -473,13 +473,13 @@ data SnapshotPolicy = SnapshotPolicy {
473473
-- blocks had to be replayed.
474474
--
475475
-- See also 'defaultSnapshotPolicy'
476-
, onDiskShouldTakeSnapshot :: Maybe DiffTime -> Word64 -> Bool
476+
, onDiskShouldTakeSnapshot :: Maybe DiffTime -> Word64 -> Bool
477477
}
478478
deriving NoThunks via OnlyCheckWhnf SnapshotPolicy
479479

480480
data SnapshotPolicyArgs = SnapshotPolicyArgs {
481-
spaInterval :: !(SnapshotInterval)
482-
, spaNum :: !(NumOfDiskSnapshots)
481+
spaInterval :: !SnapshotInterval
482+
, spaNum :: !NumOfDiskSnapshots
483483
}
484484

485485
defaultSnapshotPolicyArgs :: SnapshotPolicyArgs

ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Storage/LedgerDB/V1/Forker.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ import Ouroboros.Consensus.Config
2929
import Ouroboros.Consensus.Ledger.Abstract
3030
import Ouroboros.Consensus.Ledger.SupportsProtocol
3131
import qualified Ouroboros.Consensus.Ledger.Tables.Diff as Diff
32-
import Ouroboros.Consensus.Storage.LedgerDB.Args
3332
import Ouroboros.Consensus.Storage.LedgerDB.API
33+
import Ouroboros.Consensus.Storage.LedgerDB.Args
3434
import Ouroboros.Consensus.Storage.LedgerDB.Forker as Forker
3535
import Ouroboros.Consensus.Storage.LedgerDB.V1.BackingStore
3636
import qualified Ouroboros.Consensus.Storage.LedgerDB.V1.BackingStore.API as BackingStore

ouroboros-consensus/src/unstable-consensus-testlib/Test/Util/Serialisation/Roundtrip.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
{-# LANGUAGE FlexibleInstances #-}
88
{-# LANGUAGE GADTs #-}
99
{-# LANGUAGE OverloadedStrings #-}
10+
{-# LANGUAGE QuantifiedConstraints #-}
1011
{-# LANGUAGE RankNTypes #-}
1112
{-# LANGUAGE ScopedTypeVariables #-}
12-
{-# LANGUAGE QuantifiedConstraints #-}
1313
{-# LANGUAGE TypeApplications #-}
1414
{-# LANGUAGE TypeOperators #-}
1515
{-# LANGUAGE UndecidableInstances #-}
@@ -291,7 +291,7 @@ roundtrip_all_skipping
291291
, ArbitraryWithVersion (BlockNodeToClientVersion blk) (SomeResult blk)
292292
, Arbitrary (WithVersion (BlockNodeToClientVersion blk) (LedgerConfig blk))
293293
, ArbitraryWithVersion (QueryVersion, BlockNodeToClientVersion blk) (SomeSecond Query blk)
294-
294+
295295
, Show (BlockNodeToClientVersion blk)
296296
, BlockSupportsLedgerQuery blk
297297
)

ouroboros-consensus/test/consensus-test/Test/Consensus/Mempool/Util.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ import Ouroboros.Consensus.Node.ProtocolInfo (NumCoreNodes (..))
4949
import Ouroboros.Consensus.Protocol.BFT
5050
import Ouroboros.Consensus.Util (safeMaximumOn)
5151
import Test.Crypto.Hash ()
52-
import Test.QuickCheck
52+
import Test.QuickCheck
5353
import Test.Util.Orphans.IOLike ()
5454

5555
type TestBlock = SimpleBftBlock SimpleMockCrypto BftMockCrypto

ouroboros-consensus/test/storage-test/Test/Ouroboros/Storage/ChainDB/Model.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ import Ouroboros.Consensus.Storage.ChainDB.API (AddBlockPromise (..),
113113
validBounds)
114114
import Ouroboros.Consensus.Storage.ChainDB.Impl.ChainSel (olderThanK)
115115
import Ouroboros.Consensus.Storage.Common ()
116-
import Ouroboros.Consensus.Storage.LedgerDB.API (LedgerDbCfgF (..), LedgerDbPrune (..))
116+
import Ouroboros.Consensus.Storage.LedgerDB.API (LedgerDbCfgF (..),
117+
LedgerDbPrune (..))
117118
import qualified Ouroboros.Consensus.Storage.LedgerDB.V1.DbChangelog as DbChangelog
118119
import Ouroboros.Consensus.Util (repeatedly)
119120
import qualified Ouroboros.Consensus.Util.AnchoredFragment as Fragment

ouroboros-consensus/test/storage-test/Test/Ouroboros/Storage/LedgerDB/V1/DbChangelog.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ import Ouroboros.Consensus.Util.IndexedMemPack
6363
import qualified Ouroboros.Network.AnchoredSeq as AS
6464
import Ouroboros.Network.Block (Point (..))
6565
import qualified Ouroboros.Network.Point as Point
66-
import Test.QuickCheck
66+
import Test.QuickCheck
6767
import Test.Tasty
6868
import Test.Tasty.QuickCheck hiding (elements)
6969
import Test.Util.Orphans.Arbitrary ()

sop-extras/src/Data/SOP/Tails.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ inPairsToTails = go
114114
) n'
115115

116116
extendWithTails ::
117-
SListI xs
117+
SListI xs
118118
=> Index xs x
119119
-> Index xs y
120120
-> Tails (InPairs.Fn2 f) xs

0 commit comments

Comments
 (0)