From 7bc04ff2cc9d511c4b8552a3e5f9ad416917fb95 Mon Sep 17 00:00:00 2001 From: Jason Gross Date: Sat, 11 Jun 2016 17:23:08 -0400 Subject: Fix bug #4785 (use [ ] for vector nil) Also delimit vector_scope with vector, so that people can write %vector without having to delimit it themselves. --- theories/Compat/Coq85.v | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'theories/Compat') diff --git a/theories/Compat/Coq85.v b/theories/Compat/Coq85.v index 0ddf1acde..6e495b05c 100644 --- a/theories/Compat/Coq85.v +++ b/theories/Compat/Coq85.v @@ -21,4 +21,23 @@ Global Unset Regular Subst Tactic. Global Unset Structural Injection. Global Unset Shrink Abstract. Global Unset Shrink Obligations. -Global Set Refolding Reduction. \ No newline at end of file +Global Set Refolding Reduction. + +(** In Coq 8.5, [] meant Vector, and [ ] meant list. Restore this + behavior, to allow user-defined [] to not override vector + notations. See https://coq.inria.fr/bugs/show_bug.cgi?id=4785. *) + +Require Coq.Lists.List. +Require Coq.Vectors.VectorDef. +Module Export Coq. +Module Export Vectors. +Module VectorDef. +Module VectorNotations. +Export Coq.Vectors.VectorDef.VectorNotations. +Notation "[]" := (VectorDef.nil _) : vector_scope. +End VectorNotations. +End VectorDef. +End Vectors. +End Coq. +Export Vectors.VectorDef.VectorNotations. +Close Scope vector_scope. (* vector_scope is not opened by default *) -- cgit v1.2.3