Version française
Home     About     Download     Resources     Contact us    
Browse thread
Modules, type de modules et type polymorphes.
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Sven LUTHER <luther@d...>
Subject: Modules, type de modules et type polymorphes.
Bonjour, ...
Hello, ...

quel est le probleme de ceci ?
What is the problem with the following ?

bash-2.04$ ocaml
        Objective Caml version 3.00

# module type T_A = sig
    val string_of_a : 'a -> string
  end;;
module type T_A = sig val string_of_a : 'a -> string end
# module A : T_A = struct 
    let string_of_a = string_of_int
  end;;
Signature mismatch:
Modules do not match:
  sig val string_of_a : int -> string end
is not included in
  T_A
Values do not match:
  val string_of_a : int -> string
is not included in
  val string_of_a : 'a -> string

Amicalement,
Friendly,

Sven LUTHER