Fix recursion in identifyParProcs that broke testcases/par.occ.

It wasn't looking for PROC definitions inside Specs. This is a good example of
a pass that really wants a trimmed "everywhere"/"contexts" rather than explicit
recursion.
This commit is contained in:
Adam Sampson 2008-03-07 17:28:30 +00:00
parent 8aabb0c98e
commit 87a1c39411

View File

@ -40,8 +40,8 @@ identifyParProcs = doGeneric `extM` doProcess
findProcs :: A.Structured A.Process -> PassM ()
findProcs (A.Rep _ _ s) = findProcs s
findProcs (A.Spec _ _ s) = findProcs s
findProcs (A.ProcThen _ _ s) = findProcs s
findProcs (A.Spec _ spec s) = doGeneric spec >> findProcs s
findProcs (A.ProcThen _ p s) = doGeneric p >> findProcs s
findProcs (A.Several _ ss) = sequence_ $ map findProcs ss
findProcs (A.Only _ (A.ProcCall _ n _))
= modify (\cs -> cs { csParProcs = Set.insert n (csParProcs cs) })