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
JohnReppy opened this issue
Jul 15, 2022
· 1 comment
Assignees
Labels
bugSomething isn't workingcompilerproblem with compilergforgebug (or feature request) ported from smlnj-gforge repositoryinvalidThis doesn't seem right
When exported code (i.e., by exportML or exportFn) calls "use" and the
used code raises an exception, the exception we get isn't the one that
was raised, but ExnDuringExecution instead.
This happens in any code exported by exportFn, and it happens in code
exported by exportML if "use" is called before the REPL goes back to
console for input.
Additional comments:
There's a workaround: always use exportML and use a script to send
console input to start the program. But that's really clunky.
I am classifying this issue as a "feature", not a bug.
The root of the problem is the combination of use and exportML (I'm assuming that use is the being applied to bug1.sml to build the heap image). The implementation of the use function tracks if it is invoked inside another instance of use. Since exportML preserves this state, the use of bug2.sml appears as if it is nested inside another instance of use. The clean workaround is to delay the exportML until after the code is compiled.
bugSomething isn't workingcompilerproblem with compilergforgebug (or feature request) ported from smlnj-gforge repositoryinvalidThis doesn't seem right
Version
110.96
Operating System
OS Version
vista
Processor
x86 (32-bit)
Component
Core system
Severity
Minor
Description of the problem
When exported code (i.e., by exportML or exportFn) calls "use" and the
used code raises an exception, the exception we get isn't the one that
was raised, but ExnDuringExecution instead.
This happens in any code exported by exportFn, and it happens in code
exported by exportML if "use" is called before the REPL goes back to
console for input.
Additional comments:
There's a workaround: always use
exportML
and use a script to sendconsole input to start the program. But that's really clunky.
Transcript
Expected Behavior
No response
Steps to Reproduce
Additional Information
No response
Email address
crary@cs.cmu.edu
Comments from smlnj-gforge
Original smlnj-gforge bug number 303
Submitted via web form by Karl Crary crary@cs.cmu.edu on 2022-03-28 at 14:53:00
comment by @dmacqueen on 2022-04-12 18:28:00 +000 UTC
This is not a bug but a "misuse" of the "use" function, which is only intended to work in the top-level REPL.
The text was updated successfully, but these errors were encountered: