haskellleksah

Leksah 0.15.0.1, GHC 7.10.1 : Is it possible to pass user input to a Haskell program which is launched inside Leksah Haskell IDE? If yes, how?


Question :

Is it possible to run a program in Leksah and enter user input ? If yes, how ?

Reason for asking:

I tried two different ways to run a program in Leksah and enter user input and both ways failed:

First approach - running in normal mode (not GHCi) :

Simply writing to console works fine :

enter image description here

However, Leksah hangs when I try to run the following program, asking for input :

enter image description here

Second approach : using GHCi in Leksah.

Evaluating main2 works fine. Evaluating main hangs. It is not possible to enter input.

enter image description here

Any idea how one can enter user input when launching a program in Leksah ?


Solution

  • I am afraid little has changed since the last time this came up. You can now make a GHCJS app and run it in the Out pane. It can include DOM input elements and handle DOM events. StdIn input is still unsupported.