I am writing a program that uses the Editline library. The code is approximately as follows:

import System.Console.Editline.Readline (initialize, readline, addHistory) import Control.Monad (forever) -- тут все остальное main = do initialize forever $ do x <- readline "$ " let y = (\(Just p) -> p) x addHistory y someFunc y --что-то делаем с полученым текстом 

So, when you try to exit the program by pressing Ctrl + C, it crashes with a segfolt. Chyadt?

  • And how should she respond to CTRL + C? - alexlz 5:58 pm
  • Must - except Control.Exception. - drdaeman
  • And "segfolt" and not trapped Control.Exception - are things different? - alexlz
  • Of course. - hamstertamer

0