X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2FdeSugar%2FMatchCon.lhs;h=c4c38b163f136b504607519ba17528c2cdffc48a;hp=fd840e6f93b7c8e4402fa9dff89bbe788f24a134;hb=190f24892156953d73b55401d0467a6f1a88ce5d;hpb=aa8e9422469f1ccb3c52444fa56aae34de799334 diff --git a/compiler/deSugar/MatchCon.lhs b/compiler/deSugar/MatchCon.lhs index fd840e6..c4c38b1 100644 --- a/compiler/deSugar/MatchCon.lhs +++ b/compiler/deSugar/MatchCon.lhs @@ -10,7 +10,7 @@ module MatchCon ( matchConFamily ) where import {-# SOURCE #-} Match ( match ) -import HsSyn ( Pat(..), LPat, HsConDetails(..) ) +import HsSyn ( Pat(..), LPat, HsConDetails(..), HsRecField(..) ) import DsBinds ( dsLHsBinds ) import DataCon ( DataCon, dataConInstOrigArgTys, dataConEqSpec, dataConFieldLabels, dataConSourceArity ) @@ -132,7 +132,7 @@ conArgPats data_con arg_tys (RecCon rpats) -- mk_pat picks a WildPat of the appropriate type for absent fields, -- and the specified pattern for present fields mk_pat lbl arg_ty - = case [ pat | (sel_id,pat) <- rpats, idName (unLoc sel_id) == lbl] of + = case [ pat | HsRecField sel_id pat _ <- rpats, idName (unLoc sel_id) == lbl ] of (pat:pats) -> ASSERT( null pats ) unLoc pat [] -> WildPat arg_ty \end{code}