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.
undefinedAdd a
Debug.mlsfile tohkmc2/shared/src/test/mlscript-compile, to be imported implicitly, where the tracing logic is implemented in MLscript.funby-name parameters: for example,fun foo(fun thunk) = if ... then thunk else ()For points 2 and 3, don't modify the
Lowering.scalacode directly: instead, make a trait to be mixed in that overrides selected functions from it. ModularizeLowering.scalaas needed.