From c31626d1e1d46616ffdeef3621140872644a6f5a Mon Sep 17 00:00:00 2001 From: simonpj Date: Tue, 6 Apr 2004 11:37:50 +0000 Subject: [PATCH 1/1] [project @ 2004-04-06 11:37:50 by simonpj] Buglet in desugaring TH syntax --- ghc/compiler/deSugar/DsMeta.hs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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 -- 1.7.10.4