@@ -430,11 +430,14 @@ buildSCG' ist pats args = nub $ concatMap scgPat pats where
430430 -- that it is total.
431431 | (P _ (UN at) _, [_, _]) <- unApply ap,
432432 at == txt "assert_total" = []
433− -- under a call to "Delay LazyCodata", don't do any checking as long
434− -- as the call is guarded
435− | (P _ (UN del) _, [_,_,_]) <- unApply ap,
433+ -- under a call to "Delay LazyCodata", don't do any checking of the
434+ -- immediate call, as long as the call is guarded.
435+ -- Then check its arguments
436+ | (P _ (UN del) _, [_,_,arg]) <- unApply ap,
436437 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
438441 | (P _ n _, args) <- unApply ap
439442 = let nguarded = case guarded of
440443 Unguarded -> Unguarded