package pfff

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file objet.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
open Common

(* Type classes via objects. See also now interfaces.ml
 * 
 * todo? get more inspiration from Java to put fundamental interfaces
 * here ? such as cloneable, equaable, showable, debugable, etc
 *)

class virtual objet =
object(o:'o)
  method invariant: unit -> unit = fun () -> 
    raise Todo
  (* method check: unit -> unit = fun () -> 
    assert(o#invariant());
  *)

  method of_string: string -> unit = 
    raise Todo
  method to_string: unit -> string = 
    raise Todo
  method debug: unit -> unit = 
    raise Todo

  method misc_op_hook: unit -> 'o = 
    raise Todo

  method misc_op_hook2: unit = 
    ()
end
OCaml

Innovation. Community. Security.