Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Records typing
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-11-13 (02:44)
From: Jacques Garrigue <garrigue@k...>
Subject: Re: [Caml-list] Records typing
Follow-up to myself:

> # module M' = struct type t = float type r = {f : t} end;;
> module M' : sig type t = float and r = { f : t; }  end

There is actually a bug: depending on what is the definition, it is
either in the interpretation of type declaration or in the

# module M : sig type t = float and r = { f : t; } end = M';;
Signature mismatch:
Modules do not match: [...]

That is, the signature printed is not a valid interface for the above
module.  And the fix to the printer would not be easy.
But the printer is known to have a number of such bugs.

And if we were to fix instead the interpretation of type definitions,
using unboxed represention even for mutually recursive definitions,
then it would become impossible to represent the situation were a
record of float has a boxed representation, which can arise from
signature instanciation, as in the original post.

Most unfortunate.

Jacques Garrigue
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: