open Printf
-exception Elim_failure of string
+exception Elim_failure of string Lazy.t
exception Can_t_eliminate
let debug_print = fun _ -> ()
try
CicTypeChecker.type_of_aux' [] [] eliminator_body CicUniv.empty_ugraph
with CicTypeChecker.TypeCheckerFailure msg ->
- raise (Elim_failure (sprintf
+ raise (Elim_failure (lazy (sprintf
"type checker failure while type checking:\n%s\nerror:\n%s"
- (CicPp.ppterm eliminator_body) msg))
+ (CicPp.ppterm eliminator_body) (Lazy.force msg))))
in
if not (fst (CicReduction.are_convertible []
eliminator_type computed_type ugraph))