Created an API for distributing a fold function across multiple threads. I have created "job" data types before, this is only my latest attempts. But this one is very concise, simple, and similar to the "Control.Concurrent.MVar" APIs, so I think I am on the right track.
I am re-writing the testing program with new features and I will not be needing the "SingleTest.hs" program any more.
Removed some redundant APIs from the "Dao.Predicate" module. Ordinary 'Control.Monad.mplus' and 'Control.Monad.Error.catchError' do the job better.
Updated the comments and formatting. Added functionality to (1) check how many workers are currently busy, and (2) the ability to throw a signal to all of the workers at once.
I spent this weekend completely rewrote the test program. Actually, I used about half of the code from before, but everything has been moved into a cleaner monadic interface, so not much of the previous version is recognizable in this latest version I am committing to Git now.
I tried very hard to make the test program completely modular. I separated the Dao-specific tests from the functions that manage test configuration and command line parameters, threads, error reporting, and exception handling. To this end, I have created a callback data structure called "UnitTester". Filling in the functions of this data type and passing it to 'Dao.Test.main' will cause any unit tests to be evaluated using the same multi-threaded testing program. Hopefully now, it will be much easier for me to update or add more unit tests without modifying any of the code that takes care of all of the sticky details of parsing command line arguments, managing the configuration files, multi-threading, exception handing and reporting.
With the new test program being so modular, I was able split off all of the Dao-specific tests into their own module "Dao.CoreTests" which imports the "Dao.Test" module.