summaryrefslogtreecommitdiff
path: root/test-suite/success/Case18.v
blob: a57fe413121e29abaddb99df3389dd9370998b14 (plain)
1
2
3
4
5
6
7
8
9
10
11
(* Check or-patterns *)

Definition g x :=
  match x with ((((1 as x),_) | (_,x)), (_,(2 as y))|(y,_)) => (x,y) end.

Eval compute in (g ((1,2),(3,4))).
(* (1,3) *)

Eval compute in (g ((1,4),(3,2))).
(* (1,2) *)