[Haskell-cafe] Problem making a program in ghc

Sterling Clover s.clover at gmail.com
Fri Mar 14 00:06:24 EDT 2008


This answer may be way off base, but if differences appear between  
ghci and compiled versions, I've often found its as simple as  
remembering to compile with the -threaded flag. The ghci runtime is  
threaded by default, as I understand it, while compiled binaries are  
not, and IO operations will block in very different fashions (i.e. in  
their own thread, or stalling the entire app) depending on the runtime.

Regards,
sterl.

On Mar 13, 2008, at 3:47 PM, Adam Langley wrote:

>> web application),
>> I have a log that confirms that the response arrives correctly.
>
> I hate to see any requests for help go unanswered here, but this one
> might be tough. I think you need to give some more information,
> otherwise the suggestions are going to be very general. Can you put
> the Haskell source code on a website somewhere and link to it. Since
> it's a network service, an example request and reply might be good to
> include.
>
> In general, you should check that you are correctly flushing your
> connection. If you are using Handles to interface to the network, they
> can buffer the response. hFlush[1] may need to be called when you have
> finished generating it.
>
> [1] http://haskell.org/ghc/docs/latest/html/libraries/base/System- 
> IO.html#v%3AhFlush
>
> AGL
>
> -- 
> Adam Langley agl at imperialviolet.org http://www.imperialviolet.org
> _______________________________________________
> Haskell-Cafe mailing list



More information about the Haskell-Cafe mailing list