@@ -33,6 +33,7 @@ import Data.SOP.BasicFunctors
33
33
import Data.SOP.Counting (Exactly (.. ))
34
34
import Data.SOP.Index (Index (.. ), himap )
35
35
import Data.SOP.Strict
36
+ import qualified Data.Text as T
36
37
import Ouroboros.Consensus.Block
37
38
import Ouroboros.Consensus.Byron.ByronHFC
38
39
import Ouroboros.Consensus.Byron.Ledger (ByronBlock )
@@ -109,16 +110,11 @@ combineEras perEraExamples = Examples {
109
110
inj idx = fmap (fmap (inject $ oracularInjectionIndex exampleStartBounds idx))
110
111
111
112
perEraExamplesPrefixed :: NP Examples (CardanoEras Crypto )
112
- perEraExamplesPrefixed = hzipWith ( \ ( K eraName) es -> prefixExamples eraName es) perEraNames perEraExamples
113
+ perEraExamplesPrefixed = hcmap proxySingle prefixWithEraName perEraExamples
113
114
where
114
- perEraNames = K " Byron"
115
- :* K " Shelley"
116
- :* K " Allegra"
117
- :* K " Mary"
118
- :* K " Alonzo"
119
- :* K " Babbage"
120
- :* K " Conway"
121
- :* Nil
115
+ prefixWithEraName es = prefixExamples (T. unpack eraName) es
116
+ where
117
+ eraName = singleEraName $ singleEraInfo es
122
118
123
119
exampleLedgerConfigCardano ::
124
120
Labelled (HardForkLedgerConfig (CardanoEras Crypto ))
@@ -200,8 +196,6 @@ instance Inject Examples where
200
196
=> Proxy f -> Labelled a -> Labelled b
201
197
inj p = map (fmap (inject' p iidx))
202
198
203
-
204
-
205
199
{- ------------------------------------------------------------------------------
206
200
Setup
207
201
-------------------------------------------------------------------------------}
0 commit comments