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
Undecidability of OCaml type checking
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 1999-07-13 (19:22)
From: Dave Mason <dmason@s...>
Subject: irritability of structure name conflicts
I have the following as part of a type declaration:
	and variable = {name:scheme; mutable value:scheme; next:variable}
	and field = {fname:scheme;
		     finit:scheme option;
	and clause = {tags:scheme list;code:scheme list}
	and binding = {id:int;mutable set:bool;value:scheme}

all of which compiles fine, but I get the error:
	The label value belongs to the type Types.binding
	but is here mixed with labels of type Types.variable
at a line that says, in part:

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

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?

Thanks	../Dave