Version
110.99.4 (Latest)
Operating System
OS Version
MacOS Sonoma
Processor
System Component
Core system
Severity
Minor
Description
If a structure fails to match the signature, the core system crashes with an uncaught exception Bind. This behavior only happens when the structure uses opaque ascription :> but not :.
Transcript
[test.sml]:
structure A :> sig
val nonexistent: int
end = struct
end
$ sml test.sml
Standard ML of New Jersey (64-bit) v110.99.4 [built: Tue Aug 01 16:07:38 2023]
[opening test.sml]
test.sml:1.2-4.4 Error: unmatched value specification: nonexistent
uncaught exception Bind [nonexhaustive binding failure]
raised at: ../compiler/Elaborator/elaborate/elabmod.sml:624.13-624.67
../compiler/Elaborator/elaborate/elabmod.sml:1363.32
../compiler/Basics/stats/stats.sml:198.40
../compiler/TopLevel/interact/evalloop.sml:45.54
../compiler/TopLevel/interact/evalloop.sml:306.20-306.23
Or directly in the command line:
$ sml
Standard ML of New Jersey (64-bit) v110.99.4 [built: Tue Aug 01 16:07:38 2023]
- structure A :> sig val nonexistent : int end = struct end;
stdIn:1.2-1.59 Error: unmatched value specification: nonexistent
unexpected exception (bug?) in SML/NJ: Bind [nonexhaustive binding failure]
raised at: ../compiler/Elaborator/elaborate/elabmod.sml:624.13-624.67
../compiler/Elaborator/elaborate/elabmod.sml:1363.32
../compiler/Basics/stats/stats.sml:198.40
../compiler/TopLevel/interact/evalloop.sml:45.54
Expected Behavior
The system should report the error and continue.
Steps to Reproduce
- structure A :> sig val nonexistent : int end = struct end;
Additional Information
No response
Email address
byronzhong@cs.uchicago.edu
Version
110.99.4 (Latest)
Operating System
OS Version
MacOS Sonoma
Processor
System Component
Core system
Severity
Minor
Description
If a structure fails to match the signature, the core system crashes with an uncaught exception Bind. This behavior only happens when the structure uses opaque ascription
:>but not:.Transcript
[test.sml]:
$ sml test.sml Standard ML of New Jersey (64-bit) v110.99.4 [built: Tue Aug 01 16:07:38 2023] [opening test.sml] test.sml:1.2-4.4 Error: unmatched value specification: nonexistent uncaught exception Bind [nonexhaustive binding failure] raised at: ../compiler/Elaborator/elaborate/elabmod.sml:624.13-624.67 ../compiler/Elaborator/elaborate/elabmod.sml:1363.32 ../compiler/Basics/stats/stats.sml:198.40 ../compiler/TopLevel/interact/evalloop.sml:45.54 ../compiler/TopLevel/interact/evalloop.sml:306.20-306.23Or directly in the command line:
Expected Behavior
The system should report the error and continue.
Steps to Reproduce
Additional Information
No response
Email address
byronzhong@cs.uchicago.edu