e,Pure.lift (-n-1) (snd (List.find (fun (i,_) -> i = n) sigma)),[]
with
Not_found ->
- if should_explode && n = hd_of_i_var (cast_to_i_var !bomb)
- then ([], (let f t = Pure.A(t,t) in f (Pure.L (f (Pure.V 0)))), [])
- else ([],Pure.V n,[]))::e
+ if n = hd_of_i_var (cast_to_i_var !bomb)
+ then ([], Pure.omega should_explode, [])
+ else ([], Pure.V n, []) ) :: e
in aux 0
;;
(* ************************************************************************** *)
let ps = List.map scott_of_nf p.ps in
let sigma' = List.map (fun (x,inst) -> x, scott_of_nf inst) sigma in
- let e' = env_of_sigma freshno sigma' false (* FIXME shoudl_explode *) in
+ let e' = env_of_sigma freshno sigma' false in
+ let e'' = env_of_sigma freshno sigma' true in
prerr_endline "--------<REDUCE>---------";
- let pure_bomb = ToScott.t_of_nf (!bomb) in (* Pure.B *)
(function
| Some div ->
print_endline (Pure.print div);
let t = Pure.mwhd (e',div,[]) in
prerr_endline ("*:: " ^ (Pure.print t));
- assert (t = pure_bomb)
+ assert (Pure.diverged t)
| None -> ()) div;
List.iter (fun n ->
verbose ("_::: " ^ (Pure.print n));
- let t = Pure.mwhd (e',n,[]) in
+ let t = Pure.mwhd (e'',n,[]) in
verbose ("_:: " ^ (Pure.print t));
- assert (t <> pure_bomb)
+ assert (not (Pure.diverged t))
) conv ;
List.iteri (fun i n ->
verbose ((string_of_int i) ^ "::: " ^ (Pure.print n));