<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 10, 2014 at 11:11 PM, Michael Jones <span dir="ltr"><<a href="mailto:mike@proclivis.com" target="_blank">mike@proclivis.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":2e8" class="a3s" style="overflow:hidden">       ec <- return $ encode command<br>
       traceEventIO $ "sendCommand: encoded"<br>
       l <- ec `seq` return $ BSL.length ec</div></blockquote></div><br>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.</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div>-- <br></div><div class="gmail_signature">Gregory Collins <<a href="mailto:greg@gregorycollins.net" target="_blank">greg@gregorycollins.net</a>></div>
</div></div>