Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/ba33ff9b0ae36ebeeda2eb5a37758984779fc11d

>---------------------------------------------------------------

commit ba33ff9b0ae36ebeeda2eb5a37758984779fc11d
Author: Simon Peyton Jones <[email protected]>
Date:   Fri Jun 10 19:52:53 2011 +0100

    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 files changed, 4 insertions(+), 0 deletions(-)

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)
 



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to