Skip to content
Browse files

Add Show (Header blk) constraint to RunDemo

It would be better to provide Condense instances for data structures
defined in ouroboros-network, or move condense class to
ouroboros-network (or an independent package).  Either way we should be
able to remove the Show constraints and use Condense instead which give
better debugging experience.
  • Loading branch information...
coot committed Jul 11, 2019
1 parent 6d31410 commit cbc02bcc8758bbc976b78998a57e95c07d2d2e8d
Showing with 6 additions and 0 deletions.
  1. +6 −0 ouroboros-consensus/src/Ouroboros/Consensus/Demo/Run.hs
@@ -64,7 +64,13 @@ class ( ProtocolLedgerView blk
, Condense (HeaderHash blk)
, Condense blk
, Condense [blk]
-- TODO: the show constraints are needed when using a tracer which logs
-- a mini-protocol messages, or the fetch client decisions, we should
-- rethink where the condense class lives so that we can provide
-- 'Condenese' instances for data structures defined in ouroboros-network
-- or provide them in the module where 'Condense' is defined.
, Show blk
, Show (Header blk)
, ApplyTx blk
, Show (ApplyTxErr blk)
, Condense (GenTx blk)

0 comments on commit cbc02bc

Please sign in to comment.
You can’t perform that action at this time.