Skip to content

Commit

Permalink
WIP formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jasagredo committed Nov 14, 2024
1 parent 6cbea64 commit 9c9cee4
Show file tree
Hide file tree
Showing 15 changed files with 27 additions and 28 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE EmptyCase #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TypeFamilies #-}

{-# OPTIONS -Wno-orphans #-}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -500,14 +500,14 @@ injectTx_AtoB =
-------------------------------------------------------------------------------}

instance BlockSupportsHFLedgerQuery '[BlockA, BlockB] where
answerBlockQueryHFLookup IZ _ q = case q of {}
answerBlockQueryHFLookup (IS IZ) _cfg q = case q of {}
answerBlockQueryHFLookup IZ _ q = case q of {}
answerBlockQueryHFLookup (IS IZ) _cfg q = case q of {}
answerBlockQueryHFLookup (IS (IS idx)) _cfg _q = case idx of {}

answerBlockQueryHFTraverse IZ _cfg q = case q of {}
answerBlockQueryHFTraverse (IS IZ) _cfg q = case q of {}
answerBlockQueryHFTraverse IZ _cfg q = case q of {}
answerBlockQueryHFTraverse (IS IZ) _cfg q = case q of {}
answerBlockQueryHFTraverse (IS (IS idx)) _cfg _q = case idx of {}

queryLedgerGetTraversingFilter IZ q = case q of {}
queryLedgerGetTraversingFilter (IS IZ) q = case q of {}
queryLedgerGetTraversingFilter IZ q = case q of {}
queryLedgerGetTraversingFilter (IS IZ) q = case q of {}
queryLedgerGetTraversingFilter (IS (IS idx)) _q = case idx of {}
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ matchPolyTx is tx =
-- translations.
data TxWithOriginal tx xs blk =
TxWithOriginal { origTx :: !(NS tx xs)
, blkTx :: !(tx blk)
, blkTx :: !(tx blk)
}

-- | A list of 'TxWithOriginal' that is ready to be partially applied by having
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ import Ouroboros.Consensus.Ledger.Query.Version
import Ouroboros.Consensus.Node.NetworkProtocolVersion
(BlockNodeToClientVersion)
import Ouroboros.Consensus.Node.Serialisation
(SerialiseNodeToClient (..), SerialiseResult (..),
SerialiseBlockQueryResult (..))
(SerialiseBlockQueryResult (..),
SerialiseNodeToClient (..), SerialiseResult (..))
import Ouroboros.Consensus.Storage.LedgerDB
import qualified Ouroboros.Consensus.Storage.LedgerDB as LedgerDB
import Ouroboros.Consensus.Util (ShowProxy (..), SomeSecond (..))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ module Ouroboros.Consensus.Ledger.Tables (
, valuesMKEncoder
-- * Special classes
, LedgerTablesAreTrivial
, TrivialLedgerTables(..)
, TrivialLedgerTables (..)
, convertMapKind
, trivialLedgerTables
) where
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ module Ouroboros.Consensus.Ledger.Tables.Utils (
, attachAndApplyDiffs
, attachAndApplyDiffs'
, attachEmptyDiffs
, valuesAsDiffs
, calculateDifference
, calculateDifference'
, emptyLedgerTables
Expand All @@ -38,6 +37,7 @@ module Ouroboros.Consensus.Ledger.Tables.Utils (
, reapplyTracking
, restrictValues
, restrictValues'
, valuesAsDiffs
-- * Testing
, rawApplyDiffs
, rawAttachAndApplyDiffs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
-- both directions and we don't have access to the bytestrings that could be
-- used for the annotations (we use CBOR-in-CBOR in those cases).
module Ouroboros.Consensus.Node.Serialisation (
SerialiseNodeToClient (..)
SerialiseBlockQueryResult (..)
, SerialiseNodeToClient (..)
, SerialiseNodeToNode (..)
, SerialiseResult (..)
, SerialiseBlockQueryResult (..)
-- * Defaults
, defaultDecodeCBORinCBOR
, defaultEncodeCBORinCBOR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ module Ouroboros.Consensus.Storage.LedgerDB.Impl.Snapshots (
, TraceSnapshotEvent (..)
-- * Testing
, decodeLBackwardsCompatible
, encodeL
, destroySnapshots
, encodeL
) where

import Codec.CBOR.Decoding
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE QuantifiedConstraints #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
Expand All @@ -17,8 +17,8 @@ module Ouroboros.Consensus.Storage.LedgerDB.Impl.Validate (
ResolveBlock
, ResolvesBlocks (..)
-- * Validation
, ValidateArgs (..)
, ValidLedgerState (..)
, ValidateArgs (..)
, validate
-- * Testing
, defaultResolveWithErrors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ module Ouroboros.Consensus.Storage.LedgerDB.V2.Args (
, LedgerDbFlavorArgs (..)
) where

import Data.Void (Void)
import GHC.Generics
import NoThunks.Class
import Data.Void (Void)

data LedgerDbFlavorArgs f m = V2Args HandleArgs

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ import Ouroboros.Consensus.Node.Run (SerialiseDiskConstraints,
SerialiseNodeToClientConstraints,
SerialiseNodeToNodeConstraints)
import Ouroboros.Consensus.Node.Serialisation
(SerialiseNodeToClient (..), SerialiseNodeToNode (..),
SerialiseBlockQueryResult (..))
(SerialiseBlockQueryResult (..),
SerialiseNodeToClient (..), SerialiseNodeToNode (..))
import Ouroboros.Consensus.Storage.Serialisation (EncodeDisk (..))
import Ouroboros.Consensus.Util.CBOR (decodeAsFlatTerm)
import Ouroboros.Consensus.Util.Condense (Condense (..))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TypeFamilies #-}

module Test.Consensus.Mempool.Fairness.TestBlock (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import qualified Codec.CBOR.Encoding as CBOR
import Codec.Serialise (Serialise)
import qualified Codec.Serialise as S
import Data.Foldable (toList)
import Data.List.NonEmpty (NonEmpty( (:|) ))
import Data.List.NonEmpty (NonEmpty ((:|)))
import qualified Data.Map.Diff.Strict.Internal as DS
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
Expand All @@ -11,6 +10,7 @@
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeOperators #-}

{-# OPTIONS_GHC -Wno-orphans #-}
Expand Down Expand Up @@ -40,10 +40,10 @@ import qualified Ouroboros.Consensus.Storage.LedgerDB.V1.Args as BS
import qualified Ouroboros.Consensus.Storage.LedgerDB.V1.BackingStore as BS
import qualified Ouroboros.Consensus.Storage.LedgerDB.V1.BackingStore.Impl.InMemory as InMemory
import qualified Ouroboros.Consensus.Storage.LedgerDB.V1.BackingStore.Impl.LMDB as LMDB
import Test.Ouroboros.Storage.LedgerDB.V1.LMDB
import Ouroboros.Consensus.Util.Args
import Ouroboros.Consensus.Util.IOLike hiding (MonadMask (..),
newMVar, newTVarIO, readMVar)
import Ouroboros.Network.Testing.QuickCheck
import qualified System.Directory as Dir
import System.FS.API hiding (Handle)
import System.FS.IO (ioHasFS)
Expand All @@ -53,6 +53,7 @@ import System.IO.Temp (createTempDirectory)
import Test.Ouroboros.Storage.LedgerDB.V1.BackingStore.Lockstep
import qualified Test.Ouroboros.Storage.LedgerDB.V1.BackingStore.Mock as Mock
import Test.Ouroboros.Storage.LedgerDB.V1.BackingStore.Registry
import Test.Ouroboros.Storage.LedgerDB.V1.LMDB
import qualified Test.QuickCheck as QC
import Test.QuickCheck (Arbitrary (..), Property)
import "quickcheck-dynamic" Test.QuickCheck.Extras
Expand All @@ -66,7 +67,6 @@ import Test.Tasty.QuickCheck (QuickCheckTests (..), testProperty)
import Test.Util.LedgerStateOnlyTables
import Test.Util.Orphans.Arbitrary ()
import Test.Util.Orphans.IOLike ()
import Ouroboros.Network.Testing.QuickCheck
import Test.Util.Orphans.ToExpr ()

{-------------------------------------------------------------------------------
Expand Down

0 comments on commit 9c9cee4

Please sign in to comment.