-
Notifications
You must be signed in to change notification settings - Fork 40
General purpose web IDE for MLscript #367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: hkmc2
Are you sure you want to change the base?
Conversation
|
FYI: pressing tab does not insert whitespace, but instead navigates to the next element |
| val pwd = os.pwd | ||
| val workingDir = pwd | ||
|
|
||
| val mainTestDir = workingDir/"hkmc2"/"shared"/"src"/"test" | ||
| val stdPath = mainTestDir / "mlscript-compile" | ||
|
|
||
| val compilerPaths = new MLsCompiler.Paths: | ||
| val preludeFile = mainTestDir / "mlscript" / "decls" / "Prelude.mls" | ||
| val runtimeFile = mainTestDir / "mlscript-compile" / "Runtime.mjs" | ||
| val termFile = mainTestDir / "mlscript-compile" / "Term.mjs" | ||
|
|
||
| val nodeModulesPath = workingDir / "node_modules" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason to move all of these in the companion? Doing so means they can no longer be overridden by other users of the test suite. (There is just one example with BenchTestState for now.)
| import hkmc2.semantics.* | ||
| import hkmc2.syntax.Keyword.`override` | ||
| import semantics.Elaborator.{Ctx, State} | ||
| import hkmc2.io.Path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused?
|
|
||
| raise: | ||
| ErrorReport(msg"Cannot resolve the import path ${actualFile.toString}" -> rawPath.toLoc :: Nil) | ||
| Import(sym, rawPath.value, actualFile) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Import(sym, rawPath.value, actualFile) | |
| Import(sym, rawPath.value, actualFile) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beautiful! :^)
| catch ex => | ||
| // System.err.println("Unexpected error in watcher: " + ex) | ||
| // ex.printStackTrace() | ||
| ex.printStackTrace() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't the stack trace already shown when throw ex propagates to the top-level?
|
How about having a special syntax to denote that |
|
I didn't know TypeScript did that. It's not strictly necessary (since paths not starting with |
The practice you mentioned should be more or less like, in TypeScript projects, some people use I plan to implement path remapping options like this. So that projects in
As to whether we should use |
Note
The web IDE is (manually) deployed and accessible at https://mlscript.fun.
Planned Tasks
import "std/Stack.mls"instead of using relative paths.Bugs to be fixed