- if not (Cache.can_be_cooked uri) && replace_ugraph = None then
- invalid_arg (
- "?replace_ugraph must be (Some ugraph) when committing an object that "^
- "has no associated universe graph. If this is in make_univ phase you "^
- "should drop this exception and let univ_make commit thi object with "^
- "proper arguments");
- begin
- match replace_ugraph with
- None -> ()
- | Some g -> Cache.hack_univ uri g
- end;
- Cache.frozen_to_cooked uri
+ assert false
+ else
+*)
+ match Cache.can_be_cooked uri, replace_ugraph with
+ | true, Some _
+ | false, None ->
+ prerr_endline (
+ "?replace_ugraph must be (Some ugraph) when committing an object that "^
+ "has no associated universe graph. If this is in make_univ phase you "^
+ "should drop this exception and let univ_make commit thi object with "^
+ "proper arguments");
+ assert false
+ | _ ->
+ (match replace_ugraph with
+ | None -> ()
+ | Some g -> Cache.hack_univ uri g);
+ Cache.frozen_to_cooked uri