aboutsummaryrefslogtreecommitdiff
path: root/kernel/typeops.ml
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/typeops.ml')
-rw-r--r--kernel/typeops.ml9
1 files changed, 7 insertions, 2 deletions
diff --git a/kernel/typeops.ml b/kernel/typeops.ml
index 6d12ce3020..1232ab654e 100644
--- a/kernel/typeops.ml
+++ b/kernel/typeops.ml
@@ -69,7 +69,7 @@ let type_of_type u =
mkType uu
let type_of_sort = function
- | Prop | Set -> type1
+ | SProp | Prop | Set -> type1
| Type u -> type_of_type u
(*s Type of a de Bruijn index. *)
@@ -264,6 +264,7 @@ let judge_of_int env i =
let sort_of_product env domsort rangsort =
match (domsort, rangsort) with
+ | (_, SProp) | (SProp, _) -> rangsort
(* Product rule (s,Prop,Prop) *)
| (_, Prop) -> rangsort
(* Product rule (Prop/Set,Set,Set) *)
@@ -463,7 +464,11 @@ let rec execute env cstr =
let open Context.Rel.Declaration in
match kind cstr with
(* Atomic terms *)
- | Sort s -> type_of_sort s
+ | Sort s ->
+ (match s with
+ | SProp -> if not (Environ.sprop_allowed env) then error_disallowed_sprop env
+ | _ -> ());
+ type_of_sort s
| Rel n ->
type_of_relative env n