Debian Codegraph @

testsuite/tests/typing-signatures/els.ocaml.reference

raw
1 module type VALUE = sig type value type state type usert end
2 module type CORE0 =
3 sig
4 module V : VALUE
5 val setglobal : V.state -> string -> V.value -> unit
6 end
7 module type CORE =
8 sig
9 module V : VALUE
10 val setglobal : V.state -> string -> V.value -> unit
11 val apply : V.value -> V.state -> V.value list -> V.value
12 end
13 module type AST =
14 sig
15 module Value : VALUE
16 type chunk
17 type program
18 val get_value : chunk -> Value.value
19 end
20 module type EVALUATOR =
21 sig
22 module Value : VALUE
23 module Ast :
24 sig type chunk type program val get_value : chunk -> Value.value end
25 type state = Value.state
26 type value = Value.value
27 exception Error of string
28 val compile : Ast.program -> string
29 val setglobal : Value.state -> string -> Value.value -> unit
30 end
31 module type PARSER = sig type chunk val parse : string -> chunk end
32 module type INTERP =
33 sig
34 module Value : VALUE
35 module Ast :
36 sig type chunk type program val get_value : chunk -> Value.value end
37 type state = Value.state
38 type value = Value.value
39 exception Error of string
40 val compile : Ast.program -> string
41 val setglobal : Value.state -> string -> Value.value -> unit
42 module Parser :
43 sig type chunk = Ast.chunk val parse : string -> chunk end
44 val dostring : state -> string -> value list
45 val mk : unit -> state
46 end
47 module type USERTYPE =
48 sig type t val eq : t -> t -> bool val to_string : t -> string end
49 module type TYPEVIEW =
50 sig type combined type t val map : (combined -> t) * (t -> combined) end
51 module type COMBINED_COMMON =
52 sig
53 module T : sig type t end
54 module TV1 : sig type t val map : (T.t -> t) * (t -> T.t) end
55 module TV2 : sig type t val map : (T.t -> t) * (t -> T.t) end
56 end
57 module type COMBINED_TYPE =
58 sig
59 module T : USERTYPE
60 module TV1 : sig type t val map : (T.t -> t) * (t -> T.t) end
61 module TV2 : sig type t val map : (T.t -> t) * (t -> T.t) end
62 end
63 module type BARECODE = sig type state val init : state -> unit end
64 module USERCODE :
65 (X : TYPEVIEW) ->
66 sig
67 module type F =
68 (C : sig
69 module V :
70 sig type value type state type usert = X.combined end
71 val setglobal : V.state -> string -> V.value -> unit
72 val apply : V.value -> V.state -> V.value list -> V.value
73 end)
74 -> sig val init : C.V.state -> unit end
75 end
76 module Weapon : sig type t end
77 module type WEAPON_LIB =
78 sig
79 type t = Weapon.t
80 module T :
81 sig
82 type t = t/2
83 val eq : t -> t -> bool
84 val to_string : t -> string
85 end
86 module Make :
87 (TV : sig
88 type combined
89 type t = t/2
90 val map : (combined -> t) * (t -> combined)
91 end)
92 -> USERCODE(TV).F
93 end
94 module type X = (X : CORE) -> BARECODE
95 module type X = CORE -> BARECODE
96