Commit c605b863 authored by simonpj's avatar simonpj
Browse files

[project @ 2001-10-01 09:26:27 by simonpj]

Fix a long-standing lossage of rules attached to class operations
(A one-line fix to SimplCore.updateBinders.)
parent 0f3a6bb6
......@@ -282,9 +282,12 @@ updateBinders rule_ids rule_rhs_fvs is_exported binds
update_bndrs (Rec prs) = Rec [(update_bndr b, r) | (b,r) <- prs]
update_bndr bndr
| isImplicitId bndr = bndr -- Constructors, selectors; doesn't
-- make sense to call setIdLocalExported
-- Also can't have rules
| isImplicitId bndr = bndr_with_rules
-- Constructors, selectors; doesn't
-- make sense to call setIdLocalExported
-- They can have rules, though; e.g.
-- class Foo a where { op :: a->a }
-- {-# RULES op x = y #-}
| dont_discard bndr = setIdLocalExported bndr_with_rules
| otherwise = bndr_with_rules
where
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment