diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2016-06-24 09:03:01 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2016-06-24 11:04:31 +0100 |
commit | bb84ee44e30eeedce37ce6b09684747e2c659836 (patch) | |
tree | 458d57a0a2be6526610fe400fa692ae913aa290d | |
parent | f86a33792459bea26fe27ae1086aa161bd046a0a (diff) | |
download | haskell-bb84ee44e30eeedce37ce6b09684747e2c659836.tar.gz |
Improve pretty-printing of Avail
-rw-r--r-- | compiler/basicTypes/Avail.hs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/basicTypes/Avail.hs b/compiler/basicTypes/Avail.hs index 9595abc3ff..4dc6cb6cce 100644 --- a/compiler/basicTypes/Avail.hs +++ b/compiler/basicTypes/Avail.hs @@ -171,8 +171,11 @@ instance Outputable AvailInfo where ppr = pprAvail pprAvail :: AvailInfo -> SDoc -pprAvail (Avail _ n) = ppr n -pprAvail (AvailTC n ns fs) = ppr n <> braces (hsep (punctuate comma (map ppr ns ++ map (ppr . flLabel) fs))) +pprAvail (Avail _ n) + = ppr n +pprAvail (AvailTC n ns fs) + = ppr n <> braces (sep [ fsep (punctuate comma (map ppr ns)) <> semi + , fsep (punctuate comma (map (ppr . flLabel) fs))]) instance Binary AvailInfo where put_ bh (Avail b aa) = do |