Skip to content
This repository has been archived by the owner on Oct 5, 2022. It is now read-only.

Interactive main getting stuck #79

Open
freeman42x opened this issue Feb 21, 2022 · 1 comment
Open

Interactive main getting stuck #79

freeman42x opened this issue Feb 21, 2022 · 1 comment

Comments

@freeman42x
Copy link

When loading this into repl https://github.com/puffnfresh/fp-course/blob/twitch/projects/TicTacToe/Main.hs and running main the repl seems to break and does not output anything:

image

Plugin was configured to use stack repl. Using stack repl it works fine:

image

If I click Interrupt current computation I get:

image

Process crashed while running request

stderr:
stdout:
...
...
...
request:
:{
main
:}
Hide Stack Trace
TypeError: Cannot read property 'stderr' of undefined
    at Object.promiseGenerator (C:\Users\freeman42x\.atom\packages\ide-haskell-repl\lib\interactive-process.js:13[0]():46)

I also want to use this oportunity to thank you for creating this extension. The reload on file save and re-run last command is a super useful feature which I have not seen in any other extension/repl's. Having syntax highlighting and autocomplete is also something rare or maybe even unique.

@lierdakil
Copy link
Contributor

There's a bit of a trick to it, you need to explicitly include a newline in your input if your program expects a newline, e.g.

P1<enter><shift+enter> (<shift-enter> is "execute", i.e. send the input to the repl)

The reason it's like this is because of getChar etc. Not very intuitive, I admit, probably there's a better option.

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

No branches or pull requests

2 participants