match CicEnvironment.is_type_checked ~trust:true uri with
CicEnvironment.CheckedObj cobj -> cobj
| CicEnvironment.UncheckedObj uobj ->
- Logger.log (`Start_type_checking uri) ;
+ CicLogger.log (`Start_type_checking uri) ;
(* let's typecheck the uncooked obj *)
(match uobj with
C.Constant (_,Some te,ty,_) ->
raise (TypeCheckerFailure (WrongUriToConstant (U.string_of_uri uri)))
) ;
CicEnvironment.set_type_checking_info uri ;
- Logger.log (`Type_checking_completed uri) ;
+ CicLogger.log (`Type_checking_completed uri) ;
match CicEnvironment.is_type_checked ~trust:false uri with
CicEnvironment.CheckedObj cobj -> cobj
| CicEnvironment.UncheckedObj _ -> raise CicEnvironmentError
match CicEnvironment.is_type_checked ~trust:true uri with
CicEnvironment.CheckedObj (C.Variable (_,_,ty,_)) -> ty
| CicEnvironment.UncheckedObj (C.Variable (_,bo,ty,_)) ->
- Logger.log (`Start_type_checking uri) ;
+ CicLogger.log (`Start_type_checking uri) ;
(* only to check that ty is well-typed *)
let _ = type_of ty in
(match bo with
(NotWellTyped ("Variable " ^ (U.string_of_uri uri))))
) ;
CicEnvironment.set_type_checking_info uri ;
- Logger.log (`Type_checking_completed uri) ;
+ CicLogger.log (`Type_checking_completed uri) ;
ty
| _ ->
raise
match CicEnvironment.is_type_checked ~trust:true uri with
CicEnvironment.CheckedObj cobj -> cobj
| CicEnvironment.UncheckedObj uobj ->
- Logger.log (`Start_type_checking uri) ;
+ CicLogger.log (`Start_type_checking uri) ;
check_mutual_inductive_defs uri uobj ;
CicEnvironment.set_type_checking_info uri ;
- Logger.log (`Type_checking_completed uri) ;
+ CicLogger.log (`Type_checking_completed uri) ;
(match CicEnvironment.is_type_checked ~trust:false uri with
CicEnvironment.CheckedObj cobj -> cobj
| CicEnvironment.UncheckedObj _ -> raise CicEnvironmentError
match CicEnvironment.is_type_checked ~trust:true uri with
CicEnvironment.CheckedObj cobj -> cobj
| CicEnvironment.UncheckedObj uobj ->
- Logger.log (`Start_type_checking uri) ;
+ CicLogger.log (`Start_type_checking uri) ;
check_mutual_inductive_defs uri uobj ;
CicEnvironment.set_type_checking_info uri ;
- Logger.log (`Type_checking_completed uri) ;
+ CicLogger.log (`Type_checking_completed uri) ;
(match CicEnvironment.is_type_checked ~trust:false uri with
CicEnvironment.CheckedObj cobj -> cobj
| CicEnvironment.UncheckedObj _ -> raise CicEnvironmentError
(C.Appl [CicSubstitution.lift 1 ind ; C.Rel 1]) de1 de2
| (C.Sort C.Prop, C.Sort C.Prop) when need_dummy -> true
| (C.Sort C.Prop, C.Sort C.Set)
+ | (C.Sort C.Prop, C.Sort C.CProp)
| (C.Sort C.Prop, C.Sort C.Type) when need_dummy ->
(*CSC: WRONG. MISSING CONDITIONS ON THE ARGUMENTS OF THE CONSTRUTOR *)
(match CicEnvironment.get_obj uri with
(WrongUriToMutualInductiveDefinitions (U.string_of_uri uri)))
)
| (C.Sort C.Set, C.Sort C.Prop) when need_dummy -> true
+ | (C.Sort C.CProp, C.Sort C.Prop) when need_dummy -> true
| (C.Sort C.Set, C.Sort C.Set) when need_dummy -> true
- | (C.Sort C.Set, C.Sort C.Type) when need_dummy ->
+ | (C.Sort C.Set, C.Sort C.CProp) when need_dummy -> true
+ | (C.Sort C.CProp, C.Sort C.Set) when need_dummy -> true
+ | (C.Sort C.CProp, C.Sort C.CProp) when need_dummy -> true
+ | ((C.Sort C.Set, C.Sort C.Type) | (C.Sort C.CProp, C.Sort C.Type))
+ when need_dummy ->
(match CicEnvironment.get_obj uri with
C.InductiveDefinition (itl,_,paramsno) ->
let tys =
res &&
(match CicReduction.whd ((Some (name,(C.Decl so)))::context) ta with
C.Sort C.Prop -> true
- | C.Sort C.Set ->
+ | (C.Sort C.Set | C.Sort C.CProp) ->
(match CicEnvironment.get_obj uri with
C.InductiveDefinition (itl,_,_) ->
let (_,_,_,cl) = List.nth itl i in
)
| _ -> false
)
- | (C.Sort C.Set, C.Prod (name,so,ta)) when not need_dummy ->
+ | ((C.Sort C.Set, C.Prod (name,so,ta)) | (C.Sort C.CProp, C.Prod (name,so,ta)))
+ when not need_dummy ->
let res = CicReduction.are_convertible context so ind
in
res &&
(match CicReduction.whd ((Some (name,(C.Decl so)))::context) ta with
C.Sort C.Prop
| C.Sort C.Set -> true
+ | C.Sort C.CProp -> true
| C.Sort C.Type ->
(match CicEnvironment.get_obj uri with
C.InductiveDefinition (itl,_,paramsno) ->
let t2' = CicReduction.whd ((Some (name,C.Decl s))::context) t2 in
match (t1', t2') with
(C.Sort s1, C.Sort s2)
- when (s2 = C.Prop or s2 = C.Set) -> (* different from Coq manual!!! *)
+ when (s2 = C.Prop or s2 = C.Set or s2 = C.CProp) -> (* different from Coq manual!!! *)
C.Sort s2
| (C.Sort s1, C.Sort s2) -> C.Sort C.Type (*CSC manca la gestione degli universi!!! *)
| (_,_) ->
C.Prod (n,so,de) ->
(*CSC: [] is an empty metasenv. Is it correct? *)
let s = type_of_aux' [] context so in
- (s = C.Sort C.Prop || s = C.Sort C.Set) &&
+ (s = C.Sort C.Prop || s = C.Sort C.Set || s = C.Sort C.CProp) &&
is_small_aux ((Some (n,(C.Decl so)))::context) de
| _ -> true (*CSC: we trust the type-checker *)
in
CicEnvironment.CheckedObj _ -> ()
| CicEnvironment.UncheckedObj uobj ->
(* let's typecheck the uncooked object *)
- Logger.log (`Start_type_checking uri) ;
+ CicLogger.log (`Start_type_checking uri) ;
(match uobj with
C.Constant (_,Some te,ty,_) ->
let _ = type_of ty in
check_mutual_inductive_defs uri uobj
) ;
CicEnvironment.set_type_checking_info uri ;
- Logger.log (`Type_checking_completed uri)
+ CicLogger.log (`Type_checking_completed uri)
;;