projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
d25676a
)
Make DsMeta catch up with LastStmt (fix Trac #5235)
author
Simon Peyton Jones
<simonpj@microsoft.com>
Fri, 10 Jun 2011 18:52:53 +0000
(19:52 +0100)
committer
Simon Peyton Jones
<simonpj@microsoft.com>
Fri, 10 Jun 2011 18:52:53 +0000
(19:52 +0100)
The new monad comprehension stuff introduce LastStmt,
and DsMeta must convert that to TH syntax
compiler/deSugar/DsMeta.hs
patch
|
blob
|
history
diff --git
a/compiler/deSugar/DsMeta.hs
b/compiler/deSugar/DsMeta.hs
index
a4b47ee
..
a5cbdd3
100644
(file)
--- 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)