Re: [Haskell-cafe] how to listen on a specific IP using the network library

2010-03-16 Thread Alexander Solla
On Mar 15, 2010, at 12:09 PM, Jeremy Shaw wrote: In happstack we use a really horrible trick involving template haskell where we see if the SockAddrInet6 constructor exists at compile time and conditionally compile different versions of the code that way. But it is really ugly. Maybe a

[Haskell-cafe] how to listen on a specific IP using the network library

2010-03-15 Thread Jeremy Shaw
Hello, I would really like to modify happstack so that you can specific what IP address to listen on. So I think I want a function like: listenOnAddr :: SockAddr -> IO Socket The problem is that the user might want to specify IPv4 or IPv6 address. But support for IPv6 is only conditionally comp