Hi Ben,
Thanks for the reply.
I am planning on using Persistent which can work without template haskell, though I am planning on using the TH on my workstation to create the boiler code parts of the database setup.
The part that I'm having trouble with is collecting the composed functions. It may be a very typical problem but I'm just lost.
Let me just describe a simple example;
A message comes through the FFI to:
Haskell chooses criteria to select a sequence of data from the database
--- many functions exist to do this, some may take a random number as a parameter, the seed needs to be stored
Haskell similarly chooses a process to apply to the data
--- A random number or other deterministic chain of functions
The results from the processing are loaded into memory - (these are not the focus here)
The minimal chain of functions, parameters and seeds is stored to allow for a deterministic recall/modification
--- The input parameters and output parameters are Table and Row ID's
So Haskell isn't reacting to many input events, just a trigger that may come with a few initialization parameters.
If a function is composed of other functions which do not depend on external state they should not need to be stored in the database as they are implicit.
I imagine this is a monad problem, but kind and what other things spring to mind that might help in approaching this kind of problem?
Thanks,
Casey