From 17a460a6fc61cfaf1933f72d932ea6e673fcbbdc Mon Sep 17 00:00:00 2001
From: Michal Terepeta <michal.terepeta@gmail.com>
Date: Sun, 7 Aug 2011 19:59:48 +0200
Subject: [PATCH] Fix advice on importing infix constructors (ticket #5385).

---
 compiler/rename/RnNames.lhs |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/compiler/rename/RnNames.lhs b/compiler/rename/RnNames.lhs
index d58db09..6fc1c41 100644
--- a/compiler/rename/RnNames.lhs
+++ b/compiler/rename/RnNames.lhs
@@ -1618,7 +1618,10 @@ badImportItemErrDataCon dataType iface decl_spec ie
              <+> parens (ppr dataType <+> parens (ptext $ sLit "..")))
          ]
   where
-    datacon = ppr . rdrNameOcc $ ieName ie
+    datacon = let occname = rdrNameOcc (ieName ie)
+              in if isSymOcc occname
+                   then parens $ ppr occname
+                   else ppr occname
     source_import | mi_boot iface = ptext (sLit "(hi-boot interface)")
                   | otherwise     = empty
 
-- 
1.7.6

