Why does EasyPlot make teams invisible in GHCi?

Minimum working example:

In my system, as expected, the window displays a graph of the sine function, GHCi displays True(a return value IO Boolthat plotindicates a successful plot) and a fresh command line appears.

Suddenly, when I type, the text does not appear on the command line until I press enter. Then the text that I typed becomes visible, and GHCi responds, as expected, to any command I entered. When I type on the next command line, the same thing happens. So far, I have found two ways to return GHCi back to normal:

  • Run :lto download the file.
  • Exit and restart.

Why is this happening, and how can I prevent it?


Things that do not interfere with behavior:

  • Calling a plotfunction mainin a file and launching it using a command :mainin GHCi.
  • Tune to a file using a terminal PNG, not a window.
  • Use plot'instead plot.

Things that do not return GHCi back to normal:

  • Run :mto unload all modules.
+4
source share
1 answer

I can reproduce what you described (ghc-7.8.4, fedora 21, x86_64, xmonad).

This is not a ghci function, you get the same behavior in the shell.

gnuplot -e "set terminal x11 persist ; plot sin(x)"

(This is a (roughly) command that is sent to the shell using EasyPlot, cf https://hackage.haskell.org/package/easyplot-1.0/docs/src/Graphics-EasyPlot.html#exec )

, , () .

, - , , .

+3

All Articles