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
[Caml-list] possible typechecker bug
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-09-18 (16:11)
From: Fernando Alegre <fernando@c...>
Subject: [Caml-list] possible typechecker bug


We are puzzled by what we think is possiby a typechecker bug, as the only
difference between Tbool and Tfloat below is the specific type (either bool
or float). Is there any other explanation? I would like to get some
confirmation that this is indeed a bug before submitting it as a bug

Here is the content of test.ml:

module Test (A: sig type t end) (B: sig type x = {f:A.t} end) = struct end

module Abool = struct type t = bool end
module Bbool = struct type x = {f:bool} end

module Afloat = struct type t = float end
module Bfloat = struct type x = {f:float} end

module Tbool  = Test(Abool) (Bbool)
module Tfloat = Test(Afloat)(Bfloat)

And here is the output (both in Ocaml-3.06 and 3.07beta):

$ ocamlc -c test.ml
File "test.ml", line 11, characters 29-35:
Signature mismatch:
Modules do not match:
  sig type x = Bfloat.x = { f : float; }  end
is not included in
  sig type x = { f : Afloat.t; }  end
Type declarations do not match:
  type x = Bfloat.x = { f : float; }
is not included in
  type x = { f : Afloat.t; }

			-Fernando Alegre (fernando@cc.gatech.edu)

To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners