[project @ 1998-12-22 16:31:28 by simonpj]
[ghc-hetmet.git] / ghc / compiler / basicTypes / OccName.lhs
index 11244fb..4a0901f 100644 (file)
@@ -460,7 +460,11 @@ initTidyOccEnv = foldl (\env (OccName _ fs _ _) -> addToFM env fs 1) emptyTidyOc
 tidyOccName :: TidyOccEnv -> OccName -> (TidyOccEnv, OccName)
 
 tidyOccName in_scope occ@(OccName occ_sp real _ _)
-  | not (real `elemFM` in_scope)
+  | not (real `elemFM` in_scope) &&
+    not (isLexCon real)                        -- Hack alert!   Specialised versions of overloaded
+                                       -- constructors end up as ordinary Ids, but we don't
+                                       -- want them as ConIds in interface files.
+
   = (addToFM in_scope real 1, occ)     -- First occurrence
 
   | otherwise                          -- Already occurs