From 3b7e7f7738737475cb0f09130b0487c85906dd2b Mon Sep 17 00:00:00 2001 From: Amin Timany Date: Fri, 28 Jul 2017 13:29:36 +0200 Subject: Change the option for cumulativity --- parsing/g_vernac.ml4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'parsing') diff --git a/parsing/g_vernac.ml4 b/parsing/g_vernac.ml4 index 3d29fca779..568818c270 100644 --- a/parsing/g_vernac.ml4 +++ b/parsing/g_vernac.ml4 @@ -169,7 +169,7 @@ GEXTEND Gram let cum = match cum with Some b -> b - | None -> Flags.is_inductive_cumulativity () + | None -> Flags.is_polymorphic_inductive_cumulativity () in VernacInductive (cum, priv,f,indl) | "Fixpoint"; recs = LIST1 rec_definition SEP "with" -> -- cgit v1.2.3 From e333c2fa6d97e79b389992412846adc71eb7abda Mon Sep 17 00:00:00 2001 From: Amin Timany Date: Fri, 28 Jul 2017 17:41:38 +0200 Subject: Improve errors for cumulativity when monomorphic We now only issue an error for locally specified (non)cumulativity whenever it is the context (set locally or globally) is monorphic. --- parsing/g_vernac.ml4 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'parsing') diff --git a/parsing/g_vernac.ml4 b/parsing/g_vernac.ml4 index 568818c270..93a778274d 100644 --- a/parsing/g_vernac.ml4 +++ b/parsing/g_vernac.ml4 @@ -168,8 +168,13 @@ GEXTEND Gram let indl=List.map (fun ((a,b,c,d),e) -> ((a,b,c,k,d),e)) indl in let cum = match cum with - Some b -> b - | None -> Flags.is_polymorphic_inductive_cumulativity () + Some true -> LocalCumulativity + | Some false -> LocalNonCumulativity + | None -> + if Flags.is_polymorphic_inductive_cumulativity () then + GlobalCumulativity + else + GlobalNonCumulativity in VernacInductive (cum, priv,f,indl) | "Fixpoint"; recs = LIST1 rec_definition SEP "with" -> -- cgit v1.2.3