3 let data_constructor_arguments _loc n t =
5 if n <= 0 then <:ctyp<>> else <:ctyp< $t$ and $self (n-1)$ >>
9 let data_constructor _loc n t =
10 <:ctyp< $uid:"C"^string_of_int n$ of $data_constructor_arguments _loc n t$ >>
13 let gen_type _loc n t =
15 if n <= 0 then <:ctyp<>>
16 else <:ctyp< $self (n-1)$ | $data_constructor _loc n t$ >>
17 in <:ctyp< [ $self n$ ] >>
22 | <:ctyp@_loc< gen_type $lid:x$ >> | <:ctyp@_loc< $lid:x$ gen_type >> ->
23 Scanf.sscanf x "%[^0-9]%d" begin fun _ n ->
24 gen_type _loc n <:ctyp< $lid:x$ >>
29 AstFilters.register_str_item_filter (Ast.map_ctyp filter)#str_item;;
32 type t7 = gen_type t7;;