SHOW:
|
|
- or go back to the newest paste.
1 | (* base.ml *) | |
2 | type t = int | |
3 | ||
4 | (* medium.ml *) | |
5 | type t = Base.t | |
6 | let _a : t = 42 | |
7 | let b : t = 53 | |
8 | ||
9 | (* medium.mli *) | |
10 | type t' | |
11 | val b : t' | |
12 | - | val b : t |
12 | + | |
13 | ||
14 | (* wrapper.mli *) | |
15 | type t | |
16 | module Medium : sig | |
17 | include module type of Medium with type t' := t | |
18 | end | |
19 | val print_int : t -> unit | |
20 | ||
21 | (* wrapper.ml *) | |
22 | type t = Base.t | |
23 | module Medium = struct | |
24 | include Medium | |
25 | end | |
26 | let print_int : t -> unit = fun n -> Format.printf "%d\n" n | |
27 | ||
28 | (* main.ml *) | |
29 | let () = Wrapper.(print_int Medium.b) |