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] illegal permutation of structure fields?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-07-25 (22:27)
From: John Max Skaller <skaller@m...>
Subject: Re: [Caml-list] illegal permutation of structure fields?
Xavier Leroy wrote:
> > I've just found out to my surprise that the following does not work:


> > This yields the following error:
> >   Illegal permutation of structure fields
> >
> > Why is this illegal? Wouldn't it be very straightforward to normalize
> > the signatures (e.g. sort elements by name) before matching them?
> That's more or less what old versions of OCaml did, but it's
> incorrect.  The reason is that a module signature determine the layout
> of the corresponding structure: if


I don't understand this explanation. Markus suggested
_normalising_ the order by name. That is, the 'actual'
storage order of elements is determined by their names,
not by the order of writing.

John (Max) Skaller, 
10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850
New generation programming language Felix
Literate Programming tool Interscript
Bug reports:  FAQ:
To unsubscribe, mail  Archives: