X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FdeSugar%2FMatchCon.lhs;h=bba9d42815bec4f1a98cf105e9a33d1951ffa1f6;hb=7583384214ed6aa4a90d77c5975728a9b06149f2;hp=4e9ee8e3f7c567895b0cc861cdb751e29a2d1190;hpb=30c122df62ec75f9ed7f392f24c2925675bf1d06;p=ghc-hetmet.git diff --git a/compiler/deSugar/MatchCon.lhs b/compiler/deSugar/MatchCon.lhs index 4e9ee8e..bba9d42 100644 --- a/compiler/deSugar/MatchCon.lhs +++ b/compiler/deSugar/MatchCon.lhs @@ -25,6 +25,7 @@ import DataCon import TcType import Type import CoreSyn +import MkCore import DsMonad import DsUtils import Util ( takeList ) @@ -102,7 +103,7 @@ matchOneCon vars ty (eqn1 : eqns) -- All eqns for a single constructor = do { (wraps, eqns') <- mapAndUnzipM shift (eqn1:eqns) ; arg_vars <- selectMatchVars (take (dataConSourceArity con1) (eqn_pats (head eqns'))) - -- Use the new arugment patterns as a source of + -- Use the new argument patterns as a source of -- suggestions for the new variables ; match_result <- match (arg_vars ++ vars) ty eqns' ; return (con1, tvs1 ++ dicts1 ++ arg_vars, @@ -124,7 +125,7 @@ matchOneCon vars ty (eqn1 : eqns) -- All eqns for a single constructor = do { prs <- dsLHsBinds bind ; return (wrapBinds (tvs `zip` tvs1) . wrapBinds (ds `zip` dicts1) - . mkDsLet (Rec prs), + . mkCoreLet (Rec prs), eqn { eqn_pats = conArgPats con1 arg_tys args ++ pats }) } conArgPats :: DataCon