Re: Getting the file descriptor from a handle, without closing it

2011-10-01 Thread Bas van Dijk
On 1 October 2011 08:30, Volker Wysk wrote: > 1. > > data FD = FD { >  fdFD :: {-# UNPACK #-} !CInt, >  fdIsNonBlocking :: {-# UNPACK #-} !Int >  } > > What is that exclamation mark? That's a strictness annotation and is haskell98/2010: http://www.haskell.org/onlinereport/haskell2010/haskellch4.

REQ: add a non-closing version of handleToFd

2011-10-01 Thread Volker Wysk
Hello The function to extract a file descriptor from a handle, handleToFd, closes the handle as a side effect. This appears to be necessary in the general case, otherwise the implementers wouldn't have made it this way. But there are cases in which it isn't necessary to close the handle. For i

mkTopLevEnv: not interpreted main:Main

2011-10-01 Thread Chris Smith
So I'm trying to fix a bug in a web application that's using the GHC API with GHC 7.2. If it helps, the application is gloss-web, source code at https://github.com/cdsmith/gloss-web and the relevant module is src/Source.hs. The error I'm getting is : mkTopLevEnv: not interpreted main:MyModul