English version
Accueil     Ŕ propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis ŕ jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml ŕ l'adresse ocaml.org.

Browse thread
Another question about modules
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-07-15 (22:49)
From: Andre Nathan <andre@d...>
Subject: Re: [Caml-list] Another question about modules
I think this is similar to this simpler problem:


  type t = { id: int }
  let f x = print_int x.id; B.f x


  type t
  val f : t -> unit


  let f x = print_int 42


  val f : A.t -> unit

Which results in "This expression has type t but is here used with type
A.t" in a.ml, even though t and A.t are the same type. Is there a
general solution for this kind of situation?