on master help sign in
Productivity checker tweak

This fixes the situation where there's mutual corecursive calls to functions of no arguments.

commitf664681e0440dd551c4b24e0933e5b216e1507ee authorEdwin Brady <ecb10@st-andrews.ac.uk> dateThu 7 Jul 2016, 14:39 (10 years ago) parent6277bd1
1 file changed+3−2
src/Idris/Coverage.hs+3−2
src/Idris/Coverage.hs+3−2
@@ -557,8 +557,9 @@ buildSCG' ist topfn pats args = nub $ concatMap scgPat pats where
557557 findCalls [] Toplevel (dePat rhs') (patvars lhs')
558558 (zip pargs [0..])
559559
560− findCalls cases Delayed ap@(P _ n _) pvs args
561− | n == topfn = []
560+ -- Under a delay, calls are excluded from the graph - if it's a call to a
561+ -- non-total function we'll find that in the final totality check
562+ findCalls cases Delayed ap@(P _ n _) pvs args = []
562563 findCalls cases guarded ap@(App _ f a) pvs pargs
563564 -- under a call to "assert_total", don't do any checking, just believe
564565 -- that it is total.