[commit: ghc] wip/orf-reboot: Handle missing case in pprExport (1f0dc01)
git at git.haskell.org
git at git.haskell.org
Fri Mar 27 15:46:06 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/orf-reboot
Link : http://ghc.haskell.org/trac/ghc/changeset/1f0dc017284c759f22358855e56bed40d1762c6c/ghc
>---------------------------------------------------------------
commit 1f0dc017284c759f22358855e56bed40d1762c6c
Author: Adam Gundry <adam at well-typed.com>
Date: Fri Feb 20 13:49:31 2015 +0000
Handle missing case in pprExport
>---------------------------------------------------------------
1f0dc017284c759f22358855e56bed40d1762c6c
compiler/iface/LoadIface.hs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/compiler/iface/LoadIface.hs b/compiler/iface/LoadIface.hs
index f50fb0c..01f59f4 100644
--- a/compiler/iface/LoadIface.hs
+++ b/compiler/iface/LoadIface.hs
@@ -961,9 +961,9 @@ When printing export lists, we print like this:
pprExport :: IfaceExport -> SDoc
pprExport (Avail n) = ppr n
pprExport (AvailTC _ [] []) = Outputable.empty
-pprExport (AvailTC n (n':ns) fs)
- | n==n' = ppr n <> pp_export ns fs
- | otherwise = ppr n <> char '|' <> pp_export (n':ns) fs
+pprExport (AvailTC n ns0 fs) = case ns0 of
+ (n':ns) | n==n' -> ppr n <> pp_export ns fs
+ _ -> ppr n <> char '|' <> pp_export ns0 fs
where
pp_export [] [] = Outputable.empty
pp_export names fs = braces (hsep (map ppr names ++ map pprAvailField fs))
More information about the ghc-commits
mailing list