summaryrefslogtreecommitdiff
path: root/compiler/hsSyn
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2007-05-05 17:09:34 +0000
committerIan Lynagh <igloo@earth.li>2007-05-05 17:09:34 +0000
commit5b9a21bf48e3197816981575aeb1ab72544ed2ad (patch)
treecebe1a7826142915188467dadd08de1de9475227 /compiler/hsSyn
parent8181524071b7df3d4982349a43840456ef0747b4 (diff)
downloadhaskell-5b9a21bf48e3197816981575aeb1ab72544ed2ad.tar.gz
Handle ParStmt in collectStmtBinders; fixes tcrun013(ghci) failure
Diffstat (limited to 'compiler/hsSyn')
-rw-r--r--compiler/hsSyn/HsUtils.lhs16
1 files changed, 9 insertions, 7 deletions
diff --git a/compiler/hsSyn/HsUtils.lhs b/compiler/hsSyn/HsUtils.lhs
index fb9b8f2308..bd1fc21293 100644
--- a/compiler/hsSyn/HsUtils.lhs
+++ b/compiler/hsSyn/HsUtils.lhs
@@ -319,22 +319,24 @@ collectHsBindLocatedBinders binds = foldrBag (collectAcc . unLoc) [] binds
%************************************************************************
\begin{code}
-collectLStmtsBinders :: [LStmt id] -> [Located id]
+collectLStmtsBinders :: OutputableBndr id => [LStmt id] -> [Located id]
collectLStmtsBinders = concatMap collectLStmtBinders
-collectStmtsBinders :: [Stmt id] -> [Located id]
+collectStmtsBinders :: OutputableBndr id => [Stmt id] -> [Located id]
collectStmtsBinders = concatMap collectStmtBinders
-collectLStmtBinders :: LStmt id -> [Located id]
+collectLStmtBinders :: OutputableBndr id => LStmt id -> [Located id]
collectLStmtBinders = collectStmtBinders . unLoc
-collectStmtBinders :: Stmt id -> [Located id]
+collectStmtBinders :: OutputableBndr id => Stmt id -> [Located id]
-- Id Binders for a Stmt... [but what about pattern-sig type vars]?
collectStmtBinders (BindStmt pat _ _ _) = collectLocatedPatBinders pat
collectStmtBinders (LetStmt binds) = collectLocalBinders binds
-collectStmtBinders (ExprStmt _ _ _) = []
-collectStmtBinders (RecStmt ss _ _ _ _) = collectLStmtsBinders ss
-collectStmtBinders other = panic "collectStmtBinders"
+collectStmtBinders (ExprStmt _ _ _) = []
+collectStmtBinders (ParStmt xs) = collectLStmtsBinders
+ $ concatMap fst xs
+collectStmtBinders (RecStmt ss _ _ _ _) = collectLStmtsBinders ss
+collectStmtBinders s = pprPanic "collectStmtBinders" (ppr s)
\end{code}