We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 264717f commit 0a31c02Copy full SHA for 0a31c02
typed-protocols/src/Network/TypedProtocol/Codec.hs
@@ -322,8 +322,10 @@ data AnyMessage ps where
322
-- requires @UndecidableInstances@ and @QuantifiedConstraints@.
323
instance (forall (st :: ps) (st' :: ps). Show (Message ps st st'))
324
=> Show (AnyMessage ps) where
325
- show (AnyMessage (msg :: Message ps st st')) =
326
- "AnyMessage " ++ show msg
+ showsPrec d (AnyMessage (msg :: Message ps st st')) =
+ showParen (d > app_prec) (showString "AnyMessage " . showsPrec (app_prec + 1) msg)
327
+ where
328
+ app_prec = 10
329
330
331
-- | A convenient pattern synonym which unwrap 'AnyMessage' giving both the
0 commit comments