From 87a1c3941153c993bf103b8749123ecb0cd29d14 Mon Sep 17 00:00:00 2001 From: Adam Sampson Date: Fri, 7 Mar 2008 17:28:30 +0000 Subject: [PATCH] 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. --- backends/BackendPasses.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backends/BackendPasses.hs b/backends/BackendPasses.hs index 00535a9..d371d25 100644 --- a/backends/BackendPasses.hs +++ b/backends/BackendPasses.hs @@ -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) })