Commit 5b9a21bf authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Handle ParStmt in collectStmtBinders; fixes tcrun013(ghci) failure

parent 81815240
...@@ -319,22 +319,24 @@ collectHsBindLocatedBinders binds = foldrBag (collectAcc . unLoc) [] binds ...@@ -319,22 +319,24 @@ collectHsBindLocatedBinders binds = foldrBag (collectAcc . unLoc) [] binds
%************************************************************************ %************************************************************************
\begin{code} \begin{code}
collectLStmtsBinders :: [LStmt id] -> [Located id] collectLStmtsBinders :: OutputableBndr id => [LStmt id] -> [Located id]
collectLStmtsBinders = concatMap collectLStmtBinders collectLStmtsBinders = concatMap collectLStmtBinders
collectStmtsBinders :: [Stmt id] -> [Located id] collectStmtsBinders :: OutputableBndr id => [Stmt id] -> [Located id]
collectStmtsBinders = concatMap collectStmtBinders collectStmtsBinders = concatMap collectStmtBinders
collectLStmtBinders :: LStmt id -> [Located id] collectLStmtBinders :: OutputableBndr id => LStmt id -> [Located id]
collectLStmtBinders = collectStmtBinders . unLoc 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]? -- Id Binders for a Stmt... [but what about pattern-sig type vars]?
collectStmtBinders (BindStmt pat _ _ _) = collectLocatedPatBinders pat collectStmtBinders (BindStmt pat _ _ _) = collectLocatedPatBinders pat
collectStmtBinders (LetStmt binds) = collectLocalBinders binds collectStmtBinders (LetStmt binds) = collectLocalBinders binds
collectStmtBinders (ExprStmt _ _ _) = [] collectStmtBinders (ExprStmt _ _ _) = []
collectStmtBinders (RecStmt ss _ _ _ _) = collectLStmtsBinders ss collectStmtBinders (ParStmt xs) = collectLStmtsBinders
collectStmtBinders other = panic "collectStmtBinders" $ concatMap fst xs
collectStmtBinders (RecStmt ss _ _ _ _) = collectLStmtsBinders ss
collectStmtBinders s = pprPanic "collectStmtBinders" (ppr s)
\end{code} \end{code}
......
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