-
Notifications
You must be signed in to change notification settings - Fork 90
Evaluate file #451
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
Comments
Hi, welcome to haskell and thanks to open the issue, could you elaborate what do you mean with "evaluate the current file"? opening it in a repl/ghci session? |
Right, I knew that you could evaluate code within comments. But why not the whole file? Why not just throw a bit of code into a file and evaluate it it (output in the vscode output pane)? I guess I'm confused why it is limited to just within comments of a file. |
It seems you have some misconceptions about Haskell modules. Every Haskell program file is a mere module. Or, perhaps you might want execute the Main module. In Haskell, the module is marked as main module and provides And indeed, Eval Plugin (eval-in-comment feature as described above by @jneria) loads an entire module and evaluate the expression in that context. This is essentially the same as loading modules within GHCi (interactive REPL) and evaluating code fragments in the prompt. Indeed, there has long been a plan to support a feature to open REPL process using Language Server's context as a separate process - see haskell/haskell-language-server#477 and #450. |
Yeah that. Invoking |
I was surprised to find there is no feature for just evaluating the current file. Would that be a useful feature? I am just learning Haskell and I think it could be. Maybe I missed it.
The text was updated successfully, but these errors were encountered: