Skip to content

Commit

Permalink
Fix guard condition for nested cofixpoints in checker.
Browse files Browse the repository at this point in the history
Conflicts:
	checker/inductive.ml
  • Loading branch information
maximedenes committed Apr 11, 2014
1 parent 40c0fe7 commit 5cc2593
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions checker/inductive.ml
Expand Up @@ -900,12 +900,12 @@ let check_one_cofix env nbfix def deftype =
raise (CoFixGuardError (env,RecCallInTypeOfAbstraction a))

| CoFix (j,(_,varit,vdefs as recdef)) ->
if (List.for_all (noccur_with_meta n nbfix) args)
if List.for_all (noccur_with_meta n nbfix) args
then
let nbfix = Array.length vdefs in
if (array_for_all (noccur_with_meta n nbfix) varit) then
if array_for_all (noccur_with_meta n nbfix) varit then
let nbfix = Array.length vdefs in
let env' = push_rec_types recdef env in
(Array.iter (check_rec_call env' alreadygrd (n+1) vlra) vdefs;
(Array.iter (check_rec_call env' alreadygrd (n+nbfix) vlra) vdefs;
List.iter (check_rec_call env alreadygrd n vlra) args)
else
raise (CoFixGuardError (env,RecCallInTypeOfDef c))
Expand Down

0 comments on commit 5cc2593

Please sign in to comment.