Commit a0e30ac2 authored by Vincent Zweije's avatar Vincent Zweije
Browse files

Change local matcher to case expression

parent e50b713b
...@@ -345,16 +345,19 @@ newextract :: ...@@ -345,16 +345,19 @@ newextract ::
newextract trc newname (Trace stricts rule answer history transf) newextract trc newname (Trace stricts rule answer history transf)
| recursive | recursive
= (stricts,[recrule],recareas) = (stricts,[recrule],recareas)
= subex transf = case transf
where subex (Reduce reductroot trace) = newextract trc newname trace of Reduce reductroot trace
subex (Annotate trace) = newextract trc newname trace -> newextract trc newname trace
subex (Instantiate yestrace notrace) Annotate trace
= (stricts,yesrules++norules,yesareas++noareas) -> newextract trc newname trace
where (yesstricts,yesrules,yesareas) = newextract trc newname yestrace Instantiate yestrace notrace
(nostricts,norules,noareas) = newextract trc newname notrace -> (stricts,yesrules++norules,yesareas++noareas)
subex Stop = (stricts,[mkrule rargs rroot stoprgraph],stopareas) where (yesstricts,yesrules,yesareas) = newextract trc newname yestrace
(nostricts,norules,noareas) = newextract trc newname notrace
(recursive,unsafearea) Stop
-> (stricts,[mkrule rargs rroot stoprgraph],stopareas)
where (recursive,unsafearea)
= if (isreduce transf) = if (isreduce transf)
(foldoptional (False,undef) (findspinepart rule transf) answer) (foldoptional (False,undef) (findspinepart rule transf) answer)
(False,abort "newextract: not a Reduce transformation") (False,abort "newextract: not a Reduce transformation")
......
Supports Markdown
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