File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ depends: [
14
14
"ocaml-migrate-parsetree"
15
15
"re" {>= "1.7.1"}
16
16
"ppx_tools_versioned"
17
- "tyre"
17
+ "tyre" {>= "0.4.1"}
18
18
"qcheck" {test}
19
19
]
20
20
available: [ocaml-version >= "4.02.3"]
Original file line number Diff line number Diff line change @@ -49,19 +49,19 @@ let () =
49
49
assert (test1 %% " %%%@" = `Even_sigils (Some " %%%@" ));
50
50
assert (test1 %% " %%@" = `Odd_sigils )
51
51
52
- let concat_gen sep gen =
53
- let rec f () =
54
- match gen () with
55
- | None -> " "
56
- | Some s -> s ^ sep ^ f ()
52
+ let concat_seq sep seq =
53
+ let rec f seq =
54
+ match seq () with
55
+ | Seq. Nil -> " "
56
+ | Cons ( s , seq ) -> s ^ sep ^ f seq
57
57
in
58
- f ()
58
+ f seq
59
59
60
60
let test2 = function% tyre
61
61
| {|^<>$|} -> (= ) " <>"
62
62
| {|^<(?<x>[^<>]+)>$|} -> fun s -> s = " <" ^ x ^ " >"
63
63
| {|^<(?<x>[^<>]+)><(?<y>[^<>]+)>$|} -> fun s -> s = " <" ^ x ^ " ><" ^ y ^ " >"
64
- | {|^((?<elt>[^;<>]);)*$|} -> fun s -> concat_gen " ;" elt = s
64
+ | {|^((?<elt>[^;<>]);)*$|} -> fun s -> concat_seq " ;" elt = s
65
65
| {|^(?<a>one)|(?<b>two)$|} as x ->
66
66
(match x with
67
67
| `a a -> fun s -> a = s && a = " one"
You can’t perform that action at this time.
0 commit comments