Commit c31626d1 authored by simonpj's avatar simonpj

[project @ 2004-04-06 11:37:50 by simonpj]

Buglet in desugaring TH syntax
parent d53ac820
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment