0

For example, see this session:

Prelude> import System.Process
Prelude System.Process> system "gnuplot filename.gnu"
Prelude System.Process> 

Now, whenever I type at the terminal, nothing appears. (Strangely, input is still being read in like normal. You can type a command, press enter, and the results will appear.) I have to restart ghci in order to get it working again.

Is there some command I can call that will reset ghci without restarting it? Alternatively, is there a better way to call gnuplot so that it doesn't interfere?

Edit: this is ghc 7.6.2

Mike Izbicki
  • 6,286
  • 1
  • 23
  • 53
  • 2
    I'm not sure because apparently you get a new prompt already, but you should get the terminal back when gnuplot exits, anyway, you can try `system "gnuplot filename.gnu &"`. – Daniel Fischer Apr 10 '13 at 22:02

1 Answers1

1

You could try this:

Prelude> import System.Process
Prelude System.Process> system "gnuplot filename.gnu"
Prelude System.Process> system "reset"

Usually the reset command can be found here:

$ which reset
/usr/bin/reset
ErMejo
  • 114
  • 2