|
From: Robert H. <Rob...@cs...> - 2001-09-07 14:15:18
|
Hello everyone! We've hashed this one out locally. Derek Dreyer and Leaf Petersen will shortly post a summary of our approach. The official definition of structure sharing is useless; something else must be adopted. Best, Bob -----Original Message----- From: David Matthews [mailto:Dav...@pr...] Sent: Thursday, September 06, 2001 5:40 AM To: sml...@li... Subject: [Sml-implementers] Structure sharing and type abbreviations Dave's question reminded me that there was something that I had been meaning to ask. Structure sharing in ML97 is defined as a textual expansion of type abbreviations. So if we have signature S = sig type s type t end signature T = sig structure A: S and B: S sharing A=B end then this is equivalent to signature T = sig structure A: S and B: S sharing type A.s=B.s sharing type A.t=B.t end But this seems, if I have understood correctly, to have a problem if s or t are anything but a type name. e.g. signature S = sig type s type t = s * s end signature T = sig structure A: S and B: S sharing A=B end appears to be illegal, even though its meaning is perfectly clear. This was actually brought to my attention some time ago by Frank Pfenning who had some code which had compiled under SML/NJ but was rejected by Poly/ML. My feeling is that although this is strictly illegal there is a strong case for allowing it on pragmatic grounds. Is my interpretation correct and what do other implementations do? David. _______________________________________________ Sml-implementers mailing list Sml...@li... https://lists.sourceforge.net/lists/listinfo/sml-implementers |