diff options
author | Hugo Herbelin <Hugo.Herbelin@inria.fr> | 2017-08-24 15:34:12 +0200 |
---|---|---|
committer | Hugo Herbelin <Hugo.Herbelin@inria.fr> | 2018-02-20 10:03:07 +0100 |
commit | 77ef9a400cd570e0857a45c015bca0308e2a0eff (patch) | |
tree | f17d2698af2f1e54b65da561ed7175a293a637b1 /theories | |
parent | 5806b0476a1ac9b903503641cc3e2997d3e8d960 (diff) |
User-level support for Gonthier-Ssreflect's "if t then pat then u else v".
Diffstat (limited to 'theories')
-rw-r--r-- | theories/Init/Notations.v | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/theories/Init/Notations.v b/theories/Init/Notations.v index 5e8d2faa5..0c212b025 100644 --- a/theories/Init/Notations.v +++ b/theories/Init/Notations.v @@ -78,6 +78,18 @@ Reserved Notation "{ x : A | P & Q }" (at level 0, x at level 99). Reserved Notation "{ x : A & P }" (at level 0, x at level 99). Reserved Notation "{ x : A & P & Q }" (at level 0, x at level 99). +(** Support for Gonthier-Ssreflect's "if c is pat then u else v" *) + +Module IfNotations. + +Notation "'if' c 'is' p 'then' u 'else' v" := + (match c with p => u | _ => v end) + (at level 200, p pattern at level 100). + +End IfNotations. + +(** Scopes *) + Delimit Scope type_scope with type. Delimit Scope function_scope with function. Delimit Scope core_scope with core. |