Browse thread
Undecidability of OCaml type checking
-
Andreas Rossberg
-
Dave Mason
- John Skaller
- Xavier Leroy
- Xavier Leroy
-
Dave Mason
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Xavier Leroy <Xavier.Leroy@i...> |
| Subject: | Re: irritability of structure name conflicts |
> I didn't get the error before I added the field type! I'm (a) > confused, and (b) irritated that I have to keep making up names for > labels! I agree it's an unpleasant feature of Caml, caused by the way we do type inference on record accesses. E.g. if a label "lbl" could belong to two named record types t1 and t2, "fun x -> x.lbl" would have two types "t1 -> ..." and "t2 -> ..." > Is there some way I can force it to interpret the type constructor as > a particular type so that it chooses the labels from the correct set? Currently no, but we discussed several possible approaches on this list a while ago. If you're interested, you can search the archives at http://caml.inria.fr/. (The subject line was "CamlIDL - stub code generator and COM binding for OCaml".) Best, - Xavier Leroy