It may be not much, but after that discussion I managed to share a state between my MQTT client and an HTTP server using an IORef :-). It is tedious to pass the ref across the threads functions, but I think I now better understand how using an effect system would make this more ergonomic. Thanks you all for that instructive discussion we had on this topic!
It may be not much, but after that discussion I managed to share a state between my MQTT client and an HTTP server using an
IORef
:-). It is tedious to pass the ref across the threads functions, but I think I now better understand how using an effect system would make this more ergonomic. Thanks you all for that instructive discussion we had on this topic!