haskell / haskeline

A Haskell library for line input in command-line programs.
https://hackage.haskell.org/package/haskeline
BSD 3-Clause "New" or "Revised" License
223 stars 75 forks source link

Handling Interrupt on MacOS arm64 #180

Open aboeglin opened 1 year ago

aboeglin commented 1 year ago

I've been playing with Haskeline for the past hours and found a small issue that seems related to this one: https://github.com/judah/haskeline/issues/162. So whenever I hit ctrl-C the program exits although the interrupt handler makes it just loop, but also after some more inputs in the terminal it shows the stdin error at the bottom. The code itself is mainly the example from the documentation but I'd happily put a small reproducible example together if needed.

Here is the output from the terminal, ctrl-C was pressed right after the >.

> 

bash-5.2$ <stdin>: hGetChar: hardware fault (Input/output error)