|
|
|
|
|
by kisstheblade
3396 days ago
|
|
Always when I see haskell demonstrations eveyrthing looks like just interface declarations. You can do beautiful interfaces with eg. java also.
But where is the meat where anything actually happens? I rarely see that in these posts.
Yes I could look up the source but I don't have time to read through it randomly. This looks just so nice and stuff just magically works?: runWorkerLoop
:: (MonadBackingStore m, MonadLogger m, MonadIO m)
=> WorkerState
-> m WorkerState And monads to boot! (are monads haskells equivalent of java factories? I kid, I kid :) |
|
In reality the signature is a bit uglier, I simplified it for the post because the point was about effects. In particular we also pass in the configuration, Redis connection details, and a callback to manipulate the TBQueue.