From ba33ff9b0ae36ebeeda2eb5a37758984779fc11d Mon Sep 17 00:00:00 2001 From: Simon Peyton Jones Date: Fri, 10 Jun 2011 19:52:53 +0100 Subject: [PATCH] Make DsMeta catch up with LastStmt (fix Trac #5235) The new monad comprehension stuff introduce LastStmt, and DsMeta must convert that to TH syntax --- compiler/deSugar/DsMeta.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compiler/deSugar/DsMeta.hs b/compiler/deSugar/DsMeta.hs index a4b47ee..a5cbdd3 100644 --- a/compiler/deSugar/DsMeta.hs +++ b/compiler/deSugar/DsMeta.hs @@ -880,6 +880,10 @@ repSts (ExprStmt e _ _ _ : ss) = ; z <- repNoBindSt e2 ; (ss2,zs) <- repSts ss ; return (ss2, z : zs) } +repSts [LastStmt e _] + = do { e2 <- repLE e + ; z <- repNoBindSt e2 + ; return ([], [z]) } repSts [] = return ([],[]) repSts other = notHandled "Exotic statement" (ppr other) -- 1.7.10.4