<!DOCTYPE html>
<html><head>
    <meta charset="UTF-8">
</head><body><p>Hi,<br>I repeat my unanswered <a href="http://stackoverflow.com/questions/42774191/how-does-hgearman-client-work">question</a> in hope to find here some help:</p><p>Unfortunately the package <a href="https://hackage.haskell.org/package/hgearman-0.1.0.2/docs/Network-Gearman-Client.html">hgearman</a> does not provide any test or example and I can't work it out for myself how should be combined connectGearman and submitJob to put a job to the <a href="http://gearman.org/">gearman job server</a>.</p><p>The result of connectGearman is:</p><p>ghci> conn <- connectGearman (B.pack "x") ("localhost"::HostName) (4730::Port)<br>ghci> :t conn<br>conn :: Either GearmanError GearmanClient</p><p>but submitJob uses private function <a href="https://github.com/jperson/hgearman-client/blob/master/Network/Gearman/Client.hs#L63">submit</a> which deals with StateT. So I can only guess the result of connectGearman should be wrapped into <a href="https://github.com/jperson/hgearman-client/blob/master/Network/Gearman/Internal.hs#L27">S.StateT GearmanClient IO</a> without faintest idea how to do that.</p></body></html>