Commit 199f0386 authored by Robbert Krebbers's avatar Robbert Krebbers

Revert "Turn short-circuit && and || into definitions."

This reverts commit f3222ba2 because
it broke the machinery for determining whether a term is closed.

Example, by Morten:

  Definition dummy : val :=
    λ: <>, #true || #false.
parent 04d9c591
......@@ -85,11 +85,8 @@ Notation "e1 ;; e2" := (LamV BAnon e2%E e1%E)
(at level 100, e2 at level 200, format "e1 ;; e2") : val_scope.
(* Shortcircuit Boolean connectives *)
Definition AND (e1 e2 : expr) : expr := if: e1 then e2 else #false.
Notation "e1 && e2" := (AND e1%E e2%E) : expr_scope.
Definition OR (e1 e2 : expr) : expr := if: e1 then #true else e2.
Notation "e1 || e2" := (OR e1%E e2%E) : expr_scope.
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 *)
Notation NONE := (InjL #()).
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment