Skip to content

Commit ac97691

Browse files
committed
Move Chain-Examples module under Examples
for consistency and also in order to make `Example` module available
1 parent 1a163db commit ac97691

File tree

12 files changed

+18
-49
lines changed

12 files changed

+18
-49
lines changed

eras/shelley/test-suite/cardano-ledger-shelley-test.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ test-suite cardano-ledger-shelley-test
112112
hs-source-dirs: test
113113
other-modules:
114114
Paths_cardano_ledger_shelley_test
115-
Test.Cardano.Ledger.Shelley.Examples
115+
Test.Cardano.Ledger.Shelley.Examples.Chain
116116
Test.Cardano.Ledger.Shelley.Examples.Combinators
117117
Test.Cardano.Ledger.Shelley.Examples.EmptyBlock
118118
Test.Cardano.Ledger.Shelley.Examples.GenesisDelegation

eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples.hs renamed to eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/Chain.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{-# LANGUAGE TypeApplications #-}
22

3-
module Test.Cardano.Ledger.Shelley.Examples (
3+
module Test.Cardano.Ledger.Shelley.Examples.Chain (
44
CHAINExample (..),
55
testCHAINExample,
66
) where

eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/Combinators.hs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@
66
{-# LANGUAGE TypeFamilies #-}
77
{-# LANGUAGE TypeOperators #-}
88

9-
-- |
10-
-- Module : Test.Cardano.Ledger.Shelley.Examples.Combinators
11-
-- Description : Chain State Combinators
12-
--
13-
-- A collection of combinators for manipulating Chain State.
9+
-- | A collection of combinators for manipulating Chain State.
1410
-- The idea is to provide a clear way of describing the
1511
-- changes to the chain state when a block is processed.
1612
module Test.Cardano.Ledger.Shelley.Examples.Combinators (

eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/EmptyBlock.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import Cardano.Protocol.TPraos.OCert (KESPeriod (..))
2020
import Data.Default
2121
import GHC.Stack (HasCallStack)
2222
import Test.Cardano.Ledger.Shelley.ConcreteCryptoTypes (MockCrypto)
23-
import Test.Cardano.Ledger.Shelley.Examples (CHAINExample (..))
23+
import Test.Cardano.Ledger.Shelley.Examples.Chain (CHAINExample (..))
2424
import Test.Cardano.Ledger.Shelley.Examples.Combinators (
2525
evolveNonceUnfrozen,
2626
newLab,

eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/GenesisDelegation.hs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@
55
{-# LANGUAGE ScopedTypeVariables #-}
66
{-# LANGUAGE TypeApplications #-}
77

8-
-- |
9-
-- Module : Test.Cardano.Ledger.Shelley.Examples.GenesisDelegation
10-
-- Description : Genesis Delegation Example
11-
--
12-
-- Example demonstrating Genesis Delegation
8+
-- | Example demonstrating Genesis Delegation
139
module Test.Cardano.Ledger.Shelley.Examples.GenesisDelegation (
1410
genesisDelegExample,
1511
) where
@@ -38,8 +34,8 @@ import qualified Data.Sequence.Strict as StrictSeq
3834
import qualified Data.Set as Set
3935
import Test.Cardano.Ledger.Core.KeyPair (KeyPair (..), mkWitnessesVKey)
4036
import Test.Cardano.Ledger.Shelley.ConcreteCryptoTypes (MockCrypto)
41-
import Test.Cardano.Ledger.Shelley.Examples (CHAINExample (..), testCHAINExample)
4237
import qualified Test.Cardano.Ledger.Shelley.Examples.Cast as Cast
38+
import Test.Cardano.Ledger.Shelley.Examples.Chain (CHAINExample (..), testCHAINExample)
4339
import qualified Test.Cardano.Ledger.Shelley.Examples.Combinators as C
4440
import Test.Cardano.Ledger.Shelley.Examples.Federation (
4541
coreNodeKeysBySchedule,

eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/Init.hs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@
55
{-# LANGUAGE ScopedTypeVariables #-}
66
{-# LANGUAGE TypeApplications #-}
77

8-
-- |
9-
-- Module : Test.Cardano.Ledger.Shelley.Examples.Init
10-
-- Description : Initial State for Shelley ledger examples
11-
--
12-
-- The initial state for Shelley Ledger Examples.
8+
-- | The initial state for Shelley Ledger Examples.
139
module Test.Cardano.Ledger.Shelley.Examples.Init (
1410
ppEx,
1511
initSt,

eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/Mir.hs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@
55
{-# LANGUAGE ScopedTypeVariables #-}
66
{-# LANGUAGE TypeApplications #-}
77

8-
-- |
9-
-- Module : Test.Cardano.Ledger.Shelley.Examples.Mir
10-
-- Description : MIR Example
11-
--
12-
-- Example demonstrating the Move Instantaneous Rewards mechanism
8+
-- | Example demonstrating the Move Instantaneous Rewards mechanism
139
module Test.Cardano.Ledger.Shelley.Examples.Mir (
1410
mirExample,
1511
) where
@@ -47,8 +43,8 @@ import qualified Data.Sequence.Strict as StrictSeq
4743
import qualified Data.Set as Set
4844
import Test.Cardano.Ledger.Core.KeyPair (KeyPair (..), mkWitnessesVKey)
4945
import Test.Cardano.Ledger.Shelley.ConcreteCryptoTypes (MockCrypto)
50-
import Test.Cardano.Ledger.Shelley.Examples (CHAINExample (..), testCHAINExample)
5146
import qualified Test.Cardano.Ledger.Shelley.Examples.Cast as Cast
47+
import Test.Cardano.Ledger.Shelley.Examples.Chain (CHAINExample (..), testCHAINExample)
5248
import qualified Test.Cardano.Ledger.Shelley.Examples.Combinators as C
5349
import Test.Cardano.Ledger.Shelley.Examples.Federation (
5450
coreNodeIssuerKeys,

eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/PoolLifetime.hs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,7 @@
88
{-# LANGUAGE ScopedTypeVariables #-}
99
{-# LANGUAGE TypeApplications #-}
1010

11-
-- |
12-
-- Module : Test.Cardano.Ledger.Shelley.Examples.PoolLifetime
13-
-- Description : Pool Lifetime Example
14-
--
15-
-- Example demonstrating the creation of a new stake pool,
11+
-- | Example demonstrating the creation of a new stake pool,
1612
-- block production under Praos, rewards, and pool retirement.
1713
module Test.Cardano.Ledger.Shelley.Examples.PoolLifetime (
1814
makePulser,
@@ -92,8 +88,8 @@ import GHC.Exts (fromList)
9288
import GHC.Stack (HasCallStack)
9389
import Test.Cardano.Ledger.Core.KeyPair (mkWitnessesVKey)
9490
import Test.Cardano.Ledger.Shelley.ConcreteCryptoTypes (MockCrypto)
95-
import Test.Cardano.Ledger.Shelley.Examples (CHAINExample (..), testCHAINExample)
9691
import qualified Test.Cardano.Ledger.Shelley.Examples.Cast as Cast
92+
import Test.Cardano.Ledger.Shelley.Examples.Chain (CHAINExample (..), testCHAINExample)
9793
import qualified Test.Cardano.Ledger.Shelley.Examples.Combinators as C
9894
import Test.Cardano.Ledger.Shelley.Examples.Federation (
9995
coreNodeIssuerKeys,

eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/PoolReReg.hs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@
55
{-# LANGUAGE ScopedTypeVariables #-}
66
{-# LANGUAGE TypeApplications #-}
77

8-
-- |
9-
-- Module : Test.Cardano.Ledger.Shelley.Examples.PoolReReg
10-
-- Description : Pool Re-Registration
11-
--
12-
-- Example demonstrating the adoption of of pool parameters
8+
-- | Example demonstrating the adoption of of pool parameters
139
-- when re-registratiing.
1410
module Test.Cardano.Ledger.Shelley.Examples.PoolReReg (
1511
poolReRegExample,
@@ -45,8 +41,8 @@ import Data.Word (Word64)
4541
import GHC.Stack (HasCallStack)
4642
import Test.Cardano.Ledger.Core.KeyPair (mkWitnessesVKey)
4743
import Test.Cardano.Ledger.Shelley.ConcreteCryptoTypes (MockCrypto)
48-
import Test.Cardano.Ledger.Shelley.Examples (CHAINExample (..), testCHAINExample)
4944
import qualified Test.Cardano.Ledger.Shelley.Examples.Cast as Cast
45+
import Test.Cardano.Ledger.Shelley.Examples.Chain (CHAINExample (..), testCHAINExample)
5046
import qualified Test.Cardano.Ledger.Shelley.Examples.Combinators as C
5147
import Test.Cardano.Ledger.Shelley.Examples.Federation (coreNodeKeysBySchedule)
5248
import Test.Cardano.Ledger.Shelley.Examples.Init (

eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/TwoPools.hs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@
99
{-# LANGUAGE ScopedTypeVariables #-}
1010
{-# LANGUAGE TypeApplications #-}
1111

12-
-- |
13-
-- Module : Test.Cardano.Ledger.Shelley.Examples.TwoPools
14-
-- Description : Two Pools Example
15-
--
16-
-- Example demonstrating a particular delegation scenario involving
12+
-- | Example demonstrating a particular delegation scenario involving
1713
-- two pools. Both pools select a reward account which is *not*
1814
-- a pool owner, and which delegates to one of the pools.
1915
module Test.Cardano.Ledger.Shelley.Examples.TwoPools (
@@ -99,8 +95,8 @@ import GHC.Stack (HasCallStack)
9995
import Lens.Micro ((&), (.~), (^.))
10096
import Test.Cardano.Ledger.Core.KeyPair (mkWitnessesVKey)
10197
import Test.Cardano.Ledger.Shelley.ConcreteCryptoTypes (MockCrypto)
102-
import Test.Cardano.Ledger.Shelley.Examples (CHAINExample (..), testCHAINExample)
10398
import qualified Test.Cardano.Ledger.Shelley.Examples.Cast as Cast
99+
import Test.Cardano.Ledger.Shelley.Examples.Chain (CHAINExample (..), testCHAINExample)
104100
import qualified Test.Cardano.Ledger.Shelley.Examples.Combinators as C
105101
import Test.Cardano.Ledger.Shelley.Examples.Federation (
106102
coreNodeKeysBySchedule,

0 commit comments

Comments
 (0)