diff options
| author | Matthieu Sozeau | 2016-09-29 15:51:18 +0200 |
|---|---|---|
| committer | Matthieu Sozeau | 2016-09-29 15:56:10 +0200 |
| commit | 9615c025a2a09b69f2001d44a66a1fddef74e680 (patch) | |
| tree | 4643d4f0f38b89402265df46c56119e28a8afe40 /printing | |
| parent | 5348a615a484e379896deac8a6944af1f92b2d4c (diff) | |
Fix bug #4869, allow Prop, Set, and level names in constraints.
Diffstat (limited to 'printing')
| -rw-r--r-- | printing/ppconstr.ml | 6 | ||||
| -rw-r--r-- | printing/ppconstrsig.mli | 1 | ||||
| -rw-r--r-- | printing/ppvernac.ml | 3 |
3 files changed, 9 insertions, 1 deletions
diff --git a/printing/ppconstr.ml b/printing/ppconstr.ml index a00e4bab30..aa0ebbb83b 100644 --- a/printing/ppconstr.ml +++ b/printing/ppconstr.ml @@ -149,6 +149,12 @@ end) = struct | GType [] -> tag_type (str "Type") | GType u -> hov 0 (tag_type (str "Type") ++ pr_univ_annot pr_univ u) + let pr_glob_level = function + | GProp -> tag_type (str "Prop") + | GSet -> tag_type (str "Set") + | GType None -> tag_type (str "Type") + | GType (Some (_, u)) -> tag_type (str u) + let pr_qualid sp = let (sl, id) = repr_qualid sp in let id = tag_ref (pr_id id) in diff --git a/printing/ppconstrsig.mli b/printing/ppconstrsig.mli index a59fc6d67d..3de0d805c4 100644 --- a/printing/ppconstrsig.mli +++ b/printing/ppconstrsig.mli @@ -44,6 +44,7 @@ module type Pp = sig val pr_qualid : qualid -> std_ppcmds val pr_patvar : patvar -> std_ppcmds + val pr_glob_level : glob_level -> std_ppcmds val pr_glob_sort : glob_sort -> std_ppcmds val pr_guard_annot : (constr_expr -> std_ppcmds) -> local_binder list -> diff --git a/printing/ppvernac.ml b/printing/ppvernac.ml index 40ce28dc0c..2c41d1146c 100644 --- a/printing/ppvernac.ml +++ b/printing/ppvernac.ml @@ -838,7 +838,8 @@ module Make ) | VernacConstraint v -> let pr_uconstraint (l, d, r) = - pr_lident l ++ spc () ++ Univ.pr_constraint_type d ++ spc () ++ pr_lident r + pr_glob_level l ++ spc () ++ Univ.pr_constraint_type d ++ spc () ++ + pr_glob_level r in return ( hov 2 (keyword "Constraint" ++ spc () ++ |
