<div dir="ltr"><div>> <span style="font-size:14px"> </span><a href="https://github.com/JohnL4/DependencyGraph" target="_blank" style="font-size:14px">https://github.com/<wbr>JohnL4/DependencyGraph</a></div><div><br>A graph library of your choice + State monad would do the trick. </div><div>e.g.:  <a href="https://hackage.haskell.org/package/fgl-5.5.3.0/docs/Data-Graph-Inductive-Monad.html">fgl Data-Graph-Inductive-Monad</a><div><br><div><br></div><div>Or you could store Graph state in an MVar and work as you would with stateful approach<br>​</div></div></div></div>