GHCi & Cygwin

Sigbjorn Finne sof@galois.com
Tue, 29 Jan 2002 09:09:19 -0800


"Koen Claessen" <koen@cs.chalmers.se> writes:
>
.. 
> I have sucessfully installed the latest GHC on my (new)
> Windows laptop.
> 
> I have also installed cygwin a while ago, and I really like
> it. (I am doing all my work from a cygwin shell.)
> 
> The problem is that control-C is interpreted differently
> running GHCi from a cygwin shell than from running it in a
> normal Windows "command prompt" shell. (Control-C terminates
> GHCi in cygwin, but does not in the command prompt.)
> 
> Does anyone have any idea how to fix this?
> 

By better supporting signal handlers; GHCi gets its signal
handling from the POSIX library, which isn't supported by
the win32 port. Exposing rudimentary signal handling facilities
via other libraries ought to be done (and doable) though. But,
it won't solve the problem completely, I'm afraid (see below).

> (And maybe it is a general fix, since Hugs seems to suffer
> from exactly the same problem...)
> 

You fail to say that this is only if you start up Hugs from within a
cygwin command shell like 'bash'. Start up Hugs from a native
command processor like cmd.exe, and you'll be fine.

I'll have another look at this, but signal handling between cygwin
and non-cygwin apps is a thorny area. (You could always compile
up Hugs using cygwin tools though.)

--sigbjorn