On Mon, Nov 10, 2014 at 11:11 PM, Michael Jones <m...@proclivis.com> wrote:

>        ec <- return $ encode command
>        traceEventIO $ "sendCommand: encoded"
>        l <- ec `seq` return $ BSL.length ec
>

Your encode function probably loops on some inputs. When you call "return $
foo", foo is not forced; that doesn't happen in your example until
BSL.length forces its input. If I'm right, changing the first line to
"return $! encode command" will move the hang to before the call to
traceEventIO.

-- 
Gregory Collins <g...@gregorycollins.net>
_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to