Bug#846279: ghc: Problems with Backspace, Delete and arrow keys

Ilias Tsitsimpis i.tsitsimpis at gmail.com
Thu Dec 1 14:11:21 UTC 2016

Hi Richard,

On Wed, Nov 30, 2016 at 08:28PM, Richard Smith wrote:
> The issue is happening before getLine receives the user's input. So, suppose I
> have a basic function that asks for my name and then echoes it back to the
> terminal; if I make a typo while inputting my name and then try to backspace to
> correct, the console will display the "^?" characters. E.g.

Unfortunately, I cannot reproduce this. Backspace works as expected for
me for the following program:

    $ echo "main = getLine >>= putStrLn" > Test.hs
    $ ghc -o test Test.hs

using both v7.10.3 and v8.0.1.

Could you please try the following program in C:

================== %>< ============================
#include <stdio.h>

int main(void)
	char s[32];

	fgets(s, 32, stdin);
	printf("%s", s);
	return 0;
================== ><% ============================

Does backspace work in that case?


More information about the Pkg-haskell-maintainers mailing list