From 199f03869d7d1f6b5cfc7f53bdef1b360f447bfd Mon Sep 17 00:00:00 2001
From: Robbert Krebbers <mail@robbertkrebbers.nl>
Date: Wed, 9 Nov 2016 11:28:13 +0100
Subject: [PATCH] Revert "Turn short-circuit && and || into definitions."
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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

Example, by Morten:

  Definition dummy : val :=
    λ: <>, #true || #false.
---
 heap_lang/notation.v | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/heap_lang/notation.v b/heap_lang/notation.v
index 88a8d50b9..600cca0a3 100644
--- a/heap_lang/notation.v
+++ b/heap_lang/notation.v
@@ -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 #()).
-- 
GitLab