Debian Codegraph @

test/sexp_grammar/test_recursive_groups.ml

raw symbols SCIP
1 open Base
2
3 [@@@warning "-37"]
4
5 module _ = struct
6 type t = T of int [@@deriving_inline sexp_grammar]
7
8 let _ = fun (_ : t) -> ()
9
10 let (t_sexp_grammar : t Sexplib0.Sexp_grammar.t) =
11 { untyped =
12 Lazy
13 (lazy
14 (Variant
15 { case_sensitivity = Case_sensitive_except_first_character
16 ; clauses =
17 [ No_tag
18 { name = "T"
19 ; clause_kind =
20 List_clause { args = Cons (int_sexp_grammar.untyped, Empty) }
21 }
22 ]
23 }))
24 }
25 ;;
26
27 let _ = t_sexp_grammar
28
29 [@@@end]
30 end
31
32 module _ = struct
33 type t =
34 | T_int of int
35 | T_u of u
36
37 and u =
38 | U_int of int
39 | U_t of t
40 [@@deriving_inline sexp_grammar]
41
42 let _ = fun (_ : t) -> ()
43 let _ = fun (_ : u) -> ()
44
45 include struct
46 open struct
47 let (grammars__001_ : Sexplib0.Sexp_grammar.defn Stdlib.List.t Stdlib.Lazy.t) =
48 lazy
49 (let (t_sexp_grammar : t Sexplib0.Sexp_grammar.t) =
50 { untyped = Recursive ("t", []) }
51 and (u_sexp_grammar : u Sexplib0.Sexp_grammar.t) =
52 { untyped = Recursive ("u", []) }
53 in
54 [ { tycon = "t"
55 ; tyvars = []
56 ; grammar =
57 Variant
58 { case_sensitivity = Case_sensitive_except_first_character
59 ; clauses =
60 [ No_tag
61 { name = "T_int"
62 ; clause_kind =
63 List_clause
64 { args = Cons (int_sexp_grammar.untyped, Empty) }
65 }
66 ; No_tag
67 { name = "T_u"
68 ; clause_kind =
69 List_clause { args = Cons (u_sexp_grammar.untyped, Empty) }
70 }
71 ]
72 }
73 }
74 ; { tycon = "u"
75 ; tyvars = []
76 ; grammar =
77 Variant
78 { case_sensitivity = Case_sensitive_except_first_character
79 ; clauses =
80 [ No_tag
81 { name = "U_int"
82 ; clause_kind =
83 List_clause
84 { args = Cons (int_sexp_grammar.untyped, Empty) }
85 }
86 ; No_tag
87 { name = "U_t"
88 ; clause_kind =
89 List_clause { args = Cons (t_sexp_grammar.untyped, Empty) }
90 }
91 ]
92 }
93 }
94 ])
95 ;;
96
97 let _ = grammars__001_
98 end
99
100 let (t_sexp_grammar : t Sexplib0.Sexp_grammar.t) =
101 { untyped = Lazy (lazy (Tycon ("t", [], Stdlib.Lazy.force grammars__001_))) }
102
103 and (u_sexp_grammar : u Sexplib0.Sexp_grammar.t) =
104 { untyped = Lazy (lazy (Tycon ("u", [], Stdlib.Lazy.force grammars__001_))) }
105 ;;
106
107 let _ = t_sexp_grammar
108 and _ = u_sexp_grammar
109 end
110
111 [@@@end]
112 end