aboutsummaryrefslogtreecommitdiffhomepage
path: root/test-suite/success/Case10.v
blob: 73413c47578656b607de4917f707ac759a1558d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
(* ============================================== *)
(*     To test compilation of dependent case      *)
(*      Multiple Patterns                         *)
(* ============================================== *)
Inductive skel: Type :=
     PROP: skel
   | PROD: skel->skel->skel.

Parameter Can : skel -> Type.
Parameter default_can : (s:skel) (Can s).


Type [s1,s2:skel]
      <[s1,_:skel](Can s1)>Cases s1 s2 of
          PROP PROP => (default_can PROP)
        | s1 _ => (default_can s1)
        end.


Type [s1,s2:skel]
<[s1:skel][_:skel](Can s1)>Cases s1 s2 of
  PROP                 PROP => (default_can PROP)
| (PROP as s)             _ => (default_can s)
| ((PROD s1 s2) as s)  PROP => (default_can s)
| ((PROD s1 s2) as s)   _   => (default_can s)
end.