@@ -430,11 +430,14 @@ buildSCG' ist pats args = nub $ concatMap scgPat pats where
430 -- that it is total.
430 -- that it is total.
431 | (P _ (UN at) _, [_, _]) <- unApply ap,
431 | (P _ (UN at) _, [_, _]) <- unApply ap,
432 at == txt "assert_total" = []
432 at == txt "assert_total" = []
433− -- under a call to "Delay LazyCodata", don't do any checking as long
433+ -- under a call to "Delay LazyCodata", don't do any checking of the
434− -- as the call is guarded
434+ -- immediate call, as long as the call is guarded.
435+ -- Then check its arguments
435− | (P _ (UN del) _, [_,_,_]) <- unApply ap,
436+ | (P _ (UN del) _, [_,_,arg]) <- unApply ap,
436 guarded <- Guarded,
437 guarded <- Guarded,
437− del == txt "Delay" = []
438+ del == txt "Delay"
439+ = let (capp, args) = unApply arg in
440+ concatMap (\x -> findCalls Toplevel x pvs pargs) args
438 | (P _ n _, args) <- unApply ap
441 | (P _ n _, args) <- unApply ap
439 = let nguarded = case guarded of
442 = let nguarded = case guarded of
440 Unguarded -> Unguarded
443 Unguarded -> Unguarded