From: simonpj Date: Tue, 6 Apr 2004 11:37:50 +0000 (+0000) Subject: [project @ 2004-04-06 11:37:50 by simonpj] X-Git-Tag: Initial_conversion_from_CVS_complete~1902 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=c31626d1e1d46616ffdeef3621140872644a6f5a;hp=d53ac8202d4692bf68cc7263cf6177bfb8e9cb68;p=ghc-hetmet.git [project @ 2004-04-06 11:37:50 by simonpj] Buglet in desugaring TH syntax --- diff --git a/ghc/compiler/deSugar/DsMeta.hs b/ghc/compiler/deSugar/DsMeta.hs index 432e007..dbd8fce 100644 --- a/ghc/compiler/deSugar/DsMeta.hs +++ b/ghc/compiler/deSugar/DsMeta.hs @@ -682,10 +682,11 @@ rep_bind :: LHsBind Name -> DsM (SrcSpan, Core TH.DecQ) rep_bind (L loc (FunBind fn infx [L _ (Match [] ty (GRHSs guards wheres ty2))])) = do { (ss,wherecore) <- repBinds wheres ; guardcore <- addBinds ss (repGuards guards) - ; fn' <- lookupLBinder fn - ; p <- repPvar fn' - ; ans <- repVal p guardcore wherecore - ; return (loc, ans) } + ; fn' <- lookupLBinder fn + ; p <- repPvar fn' + ; ans <- repVal p guardcore wherecore + ; ans' <- wrapGenSyns ss ans + ; return (loc, ans') } rep_bind (L loc (FunBind fn infx ms)) = do { ms1 <- mapM repClauseTup ms @@ -697,8 +698,9 @@ rep_bind (L loc (PatBind pat (GRHSs guards wheres ty2))) = do { patcore <- repLP pat ; (ss,wherecore) <- repBinds wheres ; guardcore <- addBinds ss (repGuards guards) - ; ans <- repVal patcore guardcore wherecore - ; return (loc, ans) } + ; ans <- repVal patcore guardcore wherecore + ; ans' <- wrapGenSyns ss ans + ; return (loc, ans') } rep_bind (L loc (VarBind v e)) = do { v' <- lookupBinder v