From 45b27e6f0a304cfd8fee31e901151c6ed7bac1bf Mon Sep 17 00:00:00 2001 From: letouzey Date: Mon, 20 Jul 2009 13:03:25 +0000 Subject: Use camlp4 to accept some specific non-exhaustive patterns in groebner The camlp4 extension "refutpat" provides a syntax let* for pattern that are non-exhaustive on purpose (e.g. let* x::l = foo in ...). A Failure is raised if the pattern doesn't match the expression. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12245 85f007b7-540e-0410-9357-904b9bb8a0f7 --- lib/refutpat.ml4 | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 lib/refutpat.ml4 (limited to 'lib') diff --git a/lib/refutpat.ml4 b/lib/refutpat.ml4 new file mode 100644 index 0000000000..f2575def43 --- /dev/null +++ b/lib/refutpat.ml4 @@ -0,0 +1,33 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* + <:expr< match $e1$ with + [ $p$ -> $e2$ + | _ -> failwith "Refutable pattern failed" + ] >> ]]; +END -- cgit v1.2.3