Skip to content

Commit fe4c83b

Browse files
committed
Explicit pattern matching for capturing match refinement
1 parent e8e96b1 commit fe4c83b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

AppendOnlyLinkedList.v

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ Global Instance applist_reachable : ImmediateReachability appList :=
4040

4141
Program Definition alist_append {Γ}(n:nat)(l:alist) : rgref Γ unit Γ :=
4242
(RGFix _ _ (fun (rec:alist->rgref Γ unit Γ) =>
43-
(fun tl => match !tl with
44-
| None => ( f <- Alloc None;
43+
(fun tl => match !tl as y return (!tl = y -> _) with
44+
| None => fun _ => ( f <- Alloc None;
4545
[ tl ]:= (Some (rcons n f))
4646
)
47-
| Some l' => (match l' with
47+
| Some l' => fun _ => (match l' with
4848
| rcons n' tl' => rec tl'
4949
end)
50-
end))) l.
51-
Next Obligation. compute in Heq_anonymous. compute. rewrite <- Heq_anonymous. constructor. Qed.
50+
end _))) l.
51+
Next Obligation. compute in *. rewrite H. constructor. Qed.
5252

5353
Program Example test1 {Γ} : rgref Γ unit Γ :=
5454
l <- Alloc None;

0 commit comments

Comments
 (0)