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 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
|
Instrumentation of cases.
$ bash ../test.sh <<'EOF'
> let _ =
> function
> | 0 -> ()
> | _ -> ()
> EOF
let _ = function
| 0 ->
___bisect_visit___ 0;
()
| _ ->
___bisect_visit___ 1;
()
Recursive instrumentation of cases.
$ bash ../test.sh <<'EOF'
> let _ = function () -> function () -> ()
> EOF
let _ = function
| () -> (
___bisect_visit___ 1;
function
| () ->
___bisect_visit___ 0;
())
Instrumentation suppressed "between arguments."
$ bash ../test.sh <<'EOF'
> let _ = fun () -> function () -> ()
> EOF
let _ =
fun () -> function
| () ->
___bisect_visit___ 0;
()
Expressions in cases are in tail position.
$ bash ../test.sh <<'EOF'
> let _ = function () -> print_endline "foo"
> EOF
let _ = function
| () ->
___bisect_visit___ 0;
print_endline "foo"
Or-pattern.
$ bash ../test.sh <<'EOF'
> let _ = function None | Some _ -> print_endline "foo"
> EOF
let _ =
fun ___bisect_matched_value___ ->
match ___bisect_matched_value___ with
| None | Some _ ->
(match[@ocaml.warning "-4-8-9-11-26-27-28-33"]
___bisect_matched_value___
with
| None ->
___bisect_visit___ 0;
()
| Some _ ->
___bisect_visit___ 1;
()
| _ -> ());
print_endline "foo"
Or-pattern with polymorphic variants.
$ bash ../test.sh <<'EOF'
> let _ = function `A | `B -> print_endline "foo"
> EOF
let _ = function
| (`A | `B) as ___bisect_matched_value___ ->
(match[@ocaml.warning "-4-8-9-11-26-27-28-33"]
___bisect_matched_value___
with
| `A ->
___bisect_visit___ 0;
()
| `B ->
___bisect_visit___ 1;
()
| _ -> ());
print_endline "foo"
|