Skip to content
Snippets Groups Projects
Commit bcfc5aa7 authored by Robbert Krebbers's avatar Robbert Krebbers
Browse files

Notations for short-circuit Boolean connectives && and ||.

parent d609ac7e
No related branches found
No related tags found
No related merge requests found
...@@ -100,6 +100,10 @@ Notation "'let:' x := e1 'in' e2" := (LamV x%bind e2%E e1%E) ...@@ -100,6 +100,10 @@ Notation "'let:' x := e1 'in' e2" := (LamV x%bind e2%E e1%E)
Notation "e1 ;; e2" := (LamV BAnon e2%E e1%E) Notation "e1 ;; e2" := (LamV BAnon e2%E e1%E)
(at level 100, e2 at level 200, format "e1 ;; e2") : val_scope. (at level 100, e2 at level 200, format "e1 ;; e2") : val_scope.
(* Shortcircuit Boolean connectives *)
Notation "e1 && e2" := (If e1%E e2%E (Lit (LitBool false))) : expr_scope.
Notation "e1 || e2" := (If e1%E (Lit (LitBool true)) e2%E) : expr_scope.
(** Notations for option *) (** Notations for option *)
Notation NONE := (InjL #()). Notation NONE := (InjL #()).
Notation SOME x := (InjR x). Notation SOME x := (InjR x).
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment