Skip to content
Snippets Groups Projects
Commit ffd67c09 authored by Ralf Jung's avatar Ralf Jung
Browse files

bind scope before defining notation, to make sure the scope is set for the notation

parent de86652f
No related branches found
No related tags found
No related merge requests found
...@@ -19,6 +19,8 @@ Section tests. ...@@ -19,6 +19,8 @@ Section tests.
end. end.
Qed. Qed.
Definition val_scope_test_1 := SOMEV (#(), #()).
Definition heap_e : expr := Definition heap_e : expr :=
let: "x" := ref #1 in "x" <- !"x" + #1 ;; !"x". let: "x" := ref #1 in "x" <- !"x" + #1 ;; !"x".
......
...@@ -66,11 +66,11 @@ Inductive expr := ...@@ -66,11 +66,11 @@ Inductive expr :=
| CAS (e0 : expr) (e1 : expr) (e2 : expr) | CAS (e0 : expr) (e1 : expr) (e2 : expr)
| FAA (e1 : expr) (e2 : expr). | FAA (e1 : expr) (e2 : expr).
Bind Scope expr_scope with expr.
Notation NONE := (InjL (Lit LitUnit)) (only parsing). Notation NONE := (InjL (Lit LitUnit)) (only parsing).
Notation SOME x := (InjR x) (only parsing). Notation SOME x := (InjR x) (only parsing).
Bind Scope expr_scope with expr.
Fixpoint is_closed (X : list string) (e : expr) : bool := Fixpoint is_closed (X : list string) (e : expr) : bool :=
match e with match e with
| Var x => bool_decide (x X) | Var x => bool_decide (x X)
...@@ -97,11 +97,11 @@ Inductive val := ...@@ -97,11 +97,11 @@ Inductive val :=
| InjLV (v : val) | InjLV (v : val)
| InjRV (v : val). | InjRV (v : val).
Bind Scope val_scope with val.
Notation NONEV := (InjLV (LitV LitUnit)) (only parsing). Notation NONEV := (InjLV (LitV LitUnit)) (only parsing).
Notation SOMEV x := (InjRV x) (only parsing). Notation SOMEV x := (InjRV x) (only parsing).
Bind Scope val_scope with val.
Fixpoint of_val (v : val) : expr := Fixpoint of_val (v : val) : expr :=
match v with match v with
| RecV f x e => Rec f x e | RecV f x e => Rec f x e
......
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