let t1' = CicReduction.whd ~subst context t1 in
let t2' = CicReduction.whd ~subst ((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 or s2 = C.CProp) ->
+ | (C.Sort s1, C.Sort (C.Prop | C.Set)) ->
(* different from Coq manual!!! *)
- C.Sort s2,ugraph
+ t2',ugraph
+ | (C.Sort (C.Prop | C.Set | C.CProp), C.Sort C.CProp ) -> t2', ugraph
| (C.Sort (C.Type t1), C.Sort (C.Type t2)) ->
(* TASSI: CONSRTAINTS: the same in doubletypeinference, cicrefine *)
let t' = CicUniv.fresh() in
C.Sort (C.Type t'),ugraph2
with
CicUniv.UniverseInconsistency msg -> raise (TypeCheckerFailure msg))
- | (C.Sort _,C.Sort (C.Type t1)) ->
+ | (C.Sort _,C.Sort (C.Type t1))
+ | (C.Sort (C.Type t1), C.Sort C.CProp) ->
(* TASSI: CONSRTAINTS: the same in doubletypeinference, cicrefine *)
C.Sort (C.Type t1),ugraph (* c'e' bisogno di un fresh? *)
| (C.Meta _, C.Sort _) -> t2',ugraph