From ad33998ce15b42287b460a112226e1d35a42c232 Mon Sep 17 00:00:00 2001 From: Simon Peyton Jones Date: Thu, 23 Aug 2012 16:33:36 +0100 Subject: [PATCH] Fix to-iface conversion of RULES involving coercions in argument pattterns This is part of the fix to Trac #7165 --- compiler/iface/MkIface.lhs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/compiler/iface/MkIface.lhs b/compiler/iface/MkIface.lhs index c94b19a255..93ca3853e2 100644 --- a/compiler/iface/MkIface.lhs +++ b/compiler/iface/MkIface.lhs @@ -1782,10 +1782,9 @@ coreRuleToIfaceRule mod rule@(Rule { ru_name = name, ru_fn = fn, -- level. Reason: so that when we read it back in we'll -- construct the same ru_rough field as we have right now; -- see tcIfaceRule - do_arg (Type ty) = IfaceType (toIfaceType (deNoteType ty)) - do_arg (Coercion co) = IfaceType (coToIfaceType co) - - do_arg arg = toIfaceExpr arg + do_arg (Type ty) = IfaceType (toIfaceType (deNoteType ty)) + do_arg (Coercion co) = IfaceCo (coToIfaceType co) + do_arg arg = toIfaceExpr arg -- Compute orphanhood. See Note [Orphans] in IfaceSyn -- A rule is an orphan only if none of the variables -- 2.20.1