It is broken because, as indicated, it cannot be applied to structures that have components of a transparent type. For instance:
signature S = sig type t; type u = int end signature T = sig structure A : S structure B : S sharing A = B end
it will already be illegal, although you naturally expect it to be good.
The story here is that structure sharing was introduced in SML'90, where there were no transparent type components. With SML'97 they were added. At this point, the entire business with access restrictions became somewhat obsolete because they were (to some extent) replaced by “where type” restrictions. Thus, the semantics of sharing were greatly simplified, and the separation of the structure degraded from primitive to syntactic sugar. But this sugar was defined in such a way that it worked only with SML'90 programs, which makes sense if you consider it to be backward compatible, but not if you consider a structure that separates the central function of SML'97.
People in the SML community do not agree with the relevance of sharing restrictions. Some consider them obsolete, some are still important. Unfortunately, SML'97 was not able to add a “where structure” constraint that could properly replace the restructuring of the structure.
source share