<div dir="ltr">The <a href="https://hackage.haskell.org/package/cereal">cereal</a> package contains a useful framework for serialising data. I've also noticed that the <a href="https://ocharles.org.uk/blog/guest-posts/2014-12-23-static-pointers.html">static pointers</a> extension could be useful for serialising functions, at least those which are statically applied (I understand the caveat that this breaks if the executable is recompiled).<div><br></div><div>But it occurred to me that I might want to serialise a combination of these two things, for example, a static function call with a number of arguments, but the first of those arguments being non-static data. </div><div><br></div><div>Is there a package to that combines these two use cases, namely static functions with non-static data? I'm happy to start writing one myself, but I don't want to reinvent the wheel.</div><div><br></div><div>My ultimate aim is to combine this with <a href="https://hackage.haskell.org/package/acid-state">acid-state</a> so the current requirement to effectively pre-declare all possible operations on your data is relaxed.</div></div>