aboutsummaryrefslogtreecommitdiff
path: root/printing
diff options
context:
space:
mode:
authorHugo Herbelin2016-01-21 01:43:10 +0100
committerHugo Herbelin2016-01-21 09:29:26 +0100
commit9c2662eecc398f38be3b6280a8f760cc439bc31c (patch)
tree497b1c250e3cb2e918982b25bb029c14603ac96f /printing
parent4b075af747f65bcd73ff1c78417cf77edf6fbd76 (diff)
Stronger invariants on the use of the introduction pattern (pat1,...,patn).
The length of the pattern should now be exactly the number of assumptions and definitions introduced by the destruction or induction, including the induction hypotheses in case of an induction. Like for pattern-matching, the local definitions in the argument of the constructor can be skipped in which case a name is automatically created for these.
Diffstat (limited to 'printing')
-rw-r--r--printing/miscprint.ml4
1 files changed, 2 insertions, 2 deletions
diff --git a/printing/miscprint.ml b/printing/miscprint.ml
index d09af6d2ac..be3e62574a 100644
--- a/printing/miscprint.ml
+++ b/printing/miscprint.ml
@@ -33,9 +33,9 @@ and pr_intro_pattern_action prc = function
| IntroRewrite false -> str "<-"
and pr_or_and_intro_pattern prc = function
- | [pl] ->
+ | IntroAndPattern pl ->
str "(" ++ hv 0 (prlist_with_sep pr_comma (pr_intro_pattern prc) pl) ++ str ")"
- | pll ->
+ | IntroOrPattern pll ->
str "[" ++
hv 0 (prlist_with_sep pr_bar (prlist_with_sep spc (pr_intro_pattern prc)) pll)
++ str "]"