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
Generate sanity checks as part of the JS code (with a flag to disable that when more performance is needed):
check argument numbers
check result of field selections is not undefined
Add a flag to instrument generated JS so we can see what the program is doing in terms of the usual indented traces with function arguments and results
Add a Debug.mls file to hkmc2/shared/src/test/mlscript-compile, to be imported implicitly, where the tracing logic is implemented in MLscript.
Add fun by-name parameters: for example, fun foo(fun thunk) = if ... then thunk else ()
For points 2 and 3, don't modify the Lowering.scala code directly: instead, make a trait to be mixed in that overrides selected functions from it. Modularize Lowering.scala as needed.
The text was updated successfully, but these errors were encountered:
undefined
Add a
Debug.mls
file tohkmc2/shared/src/test/mlscript-compile
, to be imported implicitly, where the tracing logic is implemented in MLscript.fun
by-name parameters: for example,fun foo(fun thunk) = if ... then thunk else ()
For points 2 and 3, don't modify the
Lowering.scala
code directly: instead, make a trait to be mixed in that overrides selected functions from it. ModularizeLowering.scala
as needed.The text was updated successfully, but these errors were encountered: