
I think acid-state (http://hackage.haskell.org/package/acid-state) might do
what you want, at least in broad strokes. It uses a durable transaction log
to store query and update events.
As far as I know, the interface to the library doesn't expose an
undo/rollback function, so you'd have a bit of work to do to extend it to
your use case. But the core functionality to make it possible should be
there.
Can you use ghc extensions aside from Template Haskell? Template Haskell
you can do without with acid-state, but without GADTs and so on you'll have
problems.
On Sun, Jan 6, 2013 at 12:01 PM, Casey Basichis
Hi,
I am still getting a hang of Haskell. Sorry if the answer is obvious.
What sorts of packages and approaches should I be looking at if I was looking to store something like an Undo stack into a database.
Each table would refer to a function. Each records input and outputs would specify both a table ID and record ID. The records would also have a data and a Process ID to associate all functions to a specific process and give them an order.
No records are ever deleted. Rolling something back is instead a process of recreating a new, modified graph by taking the old graph from the database.
I should note that while I can generate some of the boiler parts from template haskell in advance I'm ultimately using a stage 1 compiler with no GHCI o template haskell.
Thanks, Casey
-- Casey James Basichis Composer - Cartoon Network http://www.caseyjamesbasichis.com caseybasichis@gmail.com 310.387.7540
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe