Debian Codegraph @

test/instrument/recent/gadt.t

raw
1 GADT. See https://github.com/aantron/bisect_ppx/issues/325.
2
3 $ bash ../test.sh <<'EOF'
4 > type _ t = A : unit t | B : bool t
5 > let f : type a. a t -> unit = fun x ->
6 > match x with
7 > | A | B -> ()
8 > EOF
9 type _ t = A : unit t | B : bool t
10
11 let f : type a. a t -> unit =
12 fun x ->
13 ___bisect_visit___ 2;
14 match x with
15 | ___bisect_matched_value___ -> (
16 match ___bisect_matched_value___ with
17 | A | B ->
18 (match[@ocaml.warning "-4-8-9-11-26-27-28-33"]
19 ___bisect_matched_value___
20 with
21 | A ->
22 ___bisect_visit___ 0;
23 ()
24 | B ->
25 ___bisect_visit___ 1;
26 ()
27 | _ -> ());
28 ())
29
30
31 With function.
32
33 $ bash ../test.sh <<'EOF'
34 > type _ t = A : unit t | B : bool t
35 > let f : type a. a t -> unit = function
36 > | A | B -> ()
37 > EOF
38 type _ t = A : unit t | B : bool t
39
40 let f : type a. a t -> unit =
41 fun ___bisect_matched_value___ ->
42 match ___bisect_matched_value___ with
43 | A | B ->
44 (match[@ocaml.warning "-4-8-9-11-26-27-28-33"]
45 ___bisect_matched_value___
46 with
47 | A ->
48 ___bisect_visit___ 0;
49 ()
50 | B ->
51 ___bisect_visit___ 1;
52 ()
53 | _ -> ());
54 ()