diff options
author | Sam Truzjan <pxqr.sta@gmail.com> | 2013-12-07 03:34:49 +0400 |
---|---|---|
committer | Sam Truzjan <pxqr.sta@gmail.com> | 2013-12-07 03:34:49 +0400 |
commit | 10cebfb3bf311d386af2a849c13e5e99bd975f57 (patch) | |
tree | 29eb70ebbc76904f33121deafcb50fa3b7dce1a4 /src | |
parent | ce5bf09a79da18cb7eccab359b1d80af5b304dda (diff) |
Prettify pretty instances
Diffstat (limited to 'src')
-rw-r--r-- | src/Network/BitTorrent/Exchange/Message.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Network/BitTorrent/Exchange/Message.hs b/src/Network/BitTorrent/Exchange/Message.hs index af212c3b..8659eb89 100644 --- a/src/Network/BitTorrent/Exchange/Message.hs +++ b/src/Network/BitTorrent/Exchange/Message.hs | |||
@@ -712,8 +712,8 @@ data ExtendedMessage | |||
712 | 712 | ||
713 | instance Pretty ExtendedMessage where | 713 | instance Pretty ExtendedMessage where |
714 | pretty (EHandshake ehs) = pretty ehs | 714 | pretty (EHandshake ehs) = pretty ehs |
715 | pretty (EMetadata _ msg) = pretty msg | 715 | pretty (EMetadata _ msg) = "Metadata" <+> pretty msg |
716 | pretty (EUnknown mid _ ) = "Unknown" <+> PP.text (show mid) | 716 | pretty (EUnknown mid _ ) = "Unknown" <+> PP.text (show mid) |
717 | 717 | ||
718 | instance PeerMessage ExtendedMessage where | 718 | instance PeerMessage ExtendedMessage where |
719 | envelop _ = Extended | 719 | envelop _ = Extended |
@@ -761,7 +761,7 @@ instance Default Message where | |||
761 | -- | Payload bytes are omitted. | 761 | -- | Payload bytes are omitted. |
762 | instance Pretty Message where | 762 | instance Pretty Message where |
763 | pretty (KeepAlive ) = "Keep alive" | 763 | pretty (KeepAlive ) = "Keep alive" |
764 | pretty (Status m) = pretty m | 764 | pretty (Status m) = "Status" <+> pretty m |
765 | pretty (Available m) = pretty m | 765 | pretty (Available m) = pretty m |
766 | pretty (Transfer m) = pretty m | 766 | pretty (Transfer m) = pretty m |
767 | pretty (Port p) = "Port" <+> int (fromEnum p) | 767 | pretty (Port p) = "Port" <+> int (fromEnum p) |