You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since empty strings are acceptable specs, there can be an empty spec preceding the keyword sharing.
While the parser successfully parses the following string, the type checker raises an internal exception.
structure T :> sig sharing typea = b end = structend;
Transcript
Standard ML of New Jersey [Version 110.99.7.1; 64-bit; January 17, 2025]
- structure T :> sig sharing type a = b end = struct end;
stdIn:1.34-1.39 Error: nonlocal path in type sharing: a
stdIn:1.34-1.39 Error: nonlocal path in type sharing: b
Error: Compiler bug: SigMatch:checkSharing:checkTyc
-
Expected Behavior
Report the errors gracefully.
Steps to Reproduce
structure T :> sig sharing typea = b end = structend;
Thanks for pointing this out! This is a syntax design error made back in the 1980s, and I am probably responsible for letting it sneak in by not paying sufficient attention, but it is a bit late to fix it since the "Revised" book was published 28 years ago. Could possibly be fixed in the online copy of the Definition, and we could create an Errata page for the definition (which would have been, and still is, a good idea!).
Meanwhile, I will take care not to repeat this mistake in my MsML design. I may not even include sharing equations.
Version
110.99.7.1 (Latest)
Operating System
OS Version
No response
Processor
System Component
Core system
Severity
Cosmetic
Description
The Definition (p. 15, fig. 7) defines the syntax for sharing as follows:
Since empty strings are acceptable specs, there can be an empty spec preceding the keyword
sharing
.While the parser successfully parses the following string, the type checker raises an internal exception.
Transcript
Expected Behavior
Report the errors gracefully.
Steps to Reproduce
Additional Information
No response
Email address
byronzhong@cs.uchicago.edu
The text was updated successfully, but these errors were encountered: