X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FcoreSyn%2FCoreLint.lhs;h=5cc82a2ae220f623627bc573880cc7ce006499d5;hb=e24638cf715a67d087cac3d6a8d979f76f957c62;hp=c347ed28108dffc98de65ae5faaf68ea431d3c31;hpb=79723c6692289fd01a2d0548d03a6547eae41ecb;p=ghc-hetmet.git diff --git a/compiler/coreSyn/CoreLint.lhs b/compiler/coreSyn/CoreLint.lhs index c347ed2..5cc82a2 100644 --- a/compiler/coreSyn/CoreLint.lhs +++ b/compiler/coreSyn/CoreLint.lhs @@ -117,11 +117,11 @@ lintCoreBindings binds -- M.n{r3} = ... -- M.n{r29} = ... -- becuase they both get the same linker symbol - ext_dups = findDupsEq eq_ext (map Var.varName binders) - eq_ext n1 n2 | Just m1 <- nameModule_maybe n1 - , Just m2 <- nameModule_maybe n2 - = m1==m2 && nameOccName n1 == nameOccName n2 - | otherwise = False + ext_dups = snd (removeDups ord_ext (map Var.varName binders)) + ord_ext n1 n2 | Just m1 <- nameModule_maybe n1 + , Just m2 <- nameModule_maybe n2 + = compare (m1, nameOccName n1) (m2, nameOccName n2) + | otherwise = LT lint_bind (Rec prs) = mapM_ (lintSingleBinding TopLevel Recursive) prs lint_bind (NonRec bndr rhs) = lintSingleBinding TopLevel NonRecursive (bndr,rhs) @@ -227,7 +227,7 @@ lintCoreExpr (Var var) = do { checkL (not (var == oneTupleDataConId)) (ptext (sLit "Illegal one-tuple")) - ; checkDeadIdOcc var + ; checkDeadIdOcc var ; var' <- lookupIdInScope var ; return (idType var') }