X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FbasicTypes%2FOccName.lhs;h=4a0901f703b2e6877a3a54372adcf16707bdbfd7;hb=8295d9ca0f3e72e545b35c43a4a2e1e4ec582fb6;hp=11244fbbf7c86fe605a30602917a14dcbbfd9765;hpb=083cab4adde4c12fae5eadb10a55b0aabcefe7f5;p=ghc-hetmet.git diff --git a/ghc/compiler/basicTypes/OccName.lhs b/ghc/compiler/basicTypes/OccName.lhs index 11244fb..4a0901f 100644 --- a/ghc/compiler/basicTypes/OccName.lhs +++ b/ghc/compiler/basicTypes/OccName.lhs @@ -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