Custom Query (7504 matches)


Show under each result:

Results (61 - 63 of 7504)

Ticket Resolution Summary Owner Reporter
#61 Fixed connectTo fails to fail nobody nobody
System is Linux, Red Hat 7.0.
Ghc version 5.02.

Problem with the connectTo function in package Socket. 
If the remote port to which connectTo is trying to 
connect is unavailable (i.e. no corresponding process 
is bound to that port), the connectTo function neither 
throws an exception nor issues a fatal error. The 
function simply returns an apparently OK handle (for 
which SocketPrim.isConnected also spuriously returns 

Using this handle, with something such as hPutStr, 
results in a fatal error, logging the message "Broken 

Example problem at the end of this report.

Apologies if I've gotten this completely wrong.

Many thanks,



import BSD
import IO
import Socket

main :: IO ()
main = do hostname <- getHostName 
          h <- connectTo hostname ((PortNumber . 
fromInteger) 9999)
          hPutStr h "Hello world"
#62 Fixed div 0 0 give exception / endless loop simonmar snailtalk
There is a problem with the div in ghc, to reproduce:

start ghci and type div n 0 where n is any integer (so
div 3 0 would work)

on a linux box it gives a floating point exception
while on a BSD 4.4 box it gives and endless loop using
about 87 % of cpu.

I have verified this on both the latest release
(5.02.2) and 5.02.1.

#63 None problem with parsing (##) nobody nobody
I'm using the following setup:

> ghci-5.00.2 -fglasgow-exts

> :l Test.hs

where Test.hs contains just one line
(#) = flip ($)
This yields the following error
Test.hs:1: parse error on input `)'

From my understanding, -fglasgow-exts turns on an
called 'unboxed tuples' and (# starts an unboxed tuple.

Note: See TracQuery for help on using queries.