Skip to content
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

Repl should support :exec, :execute expr command #138

Closed
justjoheinz opened this issue Dec 15, 2016 · 3 comments
Closed

Repl should support :exec, :execute expr command #138

justjoheinz opened this issue Dec 15, 2016 · 3 comments

Comments

@justjoheinz
Copy link
Contributor

The repl lets the programmer execute arbitrary expressions as long as they have a show instances.

Using this in the atom idris repl yields a reponse which seems to contain a path to an executable. The output of that executable needs to be piped back into the repl view.

Sample response from idris:

:run-program ["/var/folders/mq/b344w5kx4nv6ms0dd5vw45180000gn/T/idris14587779232007237709"]
0: "/var/folders/mq/b344w5kx4nv6ms0dd5vw45180000gn/T/idris14587779232007237709"
length: 1__proto__: Array[0]
@david-christiansen
Copy link
Member

Yes, the output from these commands in IDE mode is a path to a temporary file that contains the generated executable. This is so that they can do IO actions with access to a real console, and to give the IDE the flexibility to run them how it wants. So in Emacs, they launch in new comint buffers, but another tool could also pop them up in a native terminal window, use whatever the local equivalent of comint is, or (in the simplest case) give the user a command to paste into a terminal.

@PhilAndrew
Copy link

Would like this fixed as the REPL is the nicest place to exec

justjoheinz pushed a commit to justjoheinz/atom-language-idris that referenced this issue Jul 19, 2017
Relates to idris-hackers#138.
Copy the path of `:exec expr` to the clipboard and present a atom notification.
This solution is not ideal, but I could not find a comint buffer for atom.
@justjoheinz
Copy link
Contributor Author

The issue is fixed for the time being, unfortunately I was not able to find a good package to support better feature support. Will address this again at a later time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants