@@ -292,17 +292,17 @@ data ValidationResult h a =
292
292
ExpectedValid
293
293
294
294
-- | We expected the chain to be invalid; DSL and Cardano both agree
295
- | ExpectedInvalid {
296
- validationErrorDsl :: Text
297
- , validationErrorCardano :: Cardano. VerifyBlocksException
298
- }
295
+ -- ExpectedInvalid
296
+ -- validationErrorDsl
297
+ -- validationErrorCardano
298
+ | ExpectedInvalid ! Text ! Cardano. VerifyBlocksException
299
299
300
300
-- | Variation on 'ExpectedInvalid', where we cannot even /construct/
301
301
-- the Cardano chain, much less validate it.
302
- | ExpectedInvalid' {
303
- validationErrorDsl :: Text
304
- , validationErrorInt :: IntException
305
- }
302
+ -- ExpectedInvalid
303
+ -- validationErrorDsl
304
+ -- validationErrorInt
305
+ | ExpectedInvalid' ! Text ! IntException
306
306
307
307
-- | Disagreement between the DSL and Cardano
308
308
--
@@ -315,10 +315,10 @@ data ValidationResult h a =
315
315
--
316
316
-- We record the error message from Cardano, if Cardano thought the chain
317
317
-- was invalid, as well as the ledger that causes the problem.
318
- | Disagreement {
319
- validationLedger :: Ledger h a
320
- , validationDisagreement :: Disagreement h a
321
- }
318
+ -- Disagreement
319
+ -- validationLedger
320
+ -- validationDisagreement
321
+ | Disagreement ! ( Ledger h a ) ! ( Disagreement h a )
322
322
323
323
-- | Disagreement between Cardano and the DSL
324
324
--
@@ -357,23 +357,29 @@ expectInvalid _otherwise = False
357
357
358
358
instance (Hash h a , Buildable a ) => Buildable (ValidationResult h a ) where
359
359
build ExpectedValid = " ExpectedValid"
360
- build ExpectedInvalid {.. } = bprint
360
+ build (ExpectedInvalid
361
+ validationErrorDsl
362
+ validationErrorCardano) = bprint
361
363
( " ExpectedInvalid"
362
364
% " , errorDsl: " % build
363
365
% " , errorCardano: " % build
364
366
% " }"
365
367
)
366
368
validationErrorDsl
367
369
validationErrorCardano
368
- build ExpectedInvalid' {.. } = bprint
370
+ build (ExpectedInvalid'
371
+ validationErrorDsl
372
+ validationErrorInt) = bprint
369
373
( " ExpectedInvalid'"
370
374
% " , errorDsl: " % build
371
375
% " , errorInt: " % build
372
376
% " }"
373
377
)
374
378
validationErrorDsl
375
379
validationErrorInt
376
- build Disagreement {.. } = bprint
380
+ build (Disagreement
381
+ validationLedger
382
+ validationDisagreement) = bprint
377
383
( " Disagreement "
378
384
% " { ledger: " % build
379
385
% " , disagreement: " % build
0 commit comments