| 1 | open Common |
| 2 | |
| 3 | (* TypeClass via objects. Cf also now interfaces.ml |
| 4 | * |
| 5 | * todo? get more inspiration from Java to put fundamental interfaces |
| 6 | * here ? such as cloneable, equaable, showable, debugable, etc |
| 7 | *) |
| 8 | |
| 9 | class virtual objet = |
| 10 | object(o:'o) |
| 11 | method invariant: unit -> unit = fun () -> |
| 12 | raise Todo |
| 13 | (* method check: unit -> unit = fun () -> |
| 14 | assert(o#invariant()); |
| 15 | *) |
| 16 | |
| 17 | method of_string: string -> unit = |
| 18 | raise Todo |
| 19 | method to_string: unit -> string = |
| 20 | raise Todo |
| 21 | method debug: unit -> unit = |
| 22 | raise Todo |
| 23 | |
| 24 | method misc_op_hook: unit -> 'o = |
| 25 | raise Todo |
| 26 | |
| 27 | method misc_op_hook2: unit = |
| 28 | () |
| 29 | end |