Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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, mailto:skaller@maxtal.com.au 
10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850
New generation programming language Felix  http://felix.sourceforge.net
Literate Programming tool Interscript     
http://Interscript.sourceforge.net
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr