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] record labels of record scope using camlp4
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jacques Garrigue <garrigue@k...>
Subject: Re: [Caml-list] record labels of record scope using camlp4
From: Alain Frisch <>

> Note that the patch I proposed was not a suggestion for inclusion in
> OCaml; I think it solves in a light way a practical problem (theoretical
> non-issue) encountered by many people, but I know it is not really in
> OCaml spirit.

I actually suggested such a patch about a year ago, and then sawed my
own branch by giving the following counter-example:

        type t = {a : u}
        and u = {a : t}

        let f x y =
          (x.a == y) && (x == y.a)

If you type first (x.a == y), you get x : u, and as a result y : t,
but if you start with (x == y.a)  you obtain y : u and x : t.

That's bad, but not really dangerous, I must say. And that's about as
bad as you can get.

Maybe we will be able to do that once polymorphic methods are
included... (Polymorphic methods are not relevant here, but they might
be accompanied by a mechanism to rule out the above example)


Jacques Garrigue
Bug reports:  FAQ:
To unsubscribe, mail  Archives: