Previously, the assertEquivalentProblems function and functions used by it dealt with results inside Maybe, sometimes then inside IO. These functions have been migrated to the new TestMonad. Instead of using Maybe, any problems with the test are dealt with by failing the test instead.
The assertEquivalentProblems function used to take a list of labelled expressions for comparison purposes. Now that we have an ordering on the AST, this is pointless. Instead we can directly sort the lists by the expressions involved. This simplifies the code a little.
Finally, a bug has been fixed. The mapping between expected and actual columns in the swapColumns' function of translateEquations was being used as a backward mapping, even though it was in fact a forward mapping. So that has also been corrected.
Previously, most of the flow-graph building functions were inside the where clause of buildFlowGraph. They have been moved to the top-level (with only a few small changes to make this possible - the main one being to store the labelling functions in a reader monad, which only required changing a couple of lines) and used by an additional buildFlowGraphP function, that is now used by the tests to make them work simply. None of the new top-level functions except buildFlowGraphP are exported from FlowGraph.
This patch is actually an amalgam of multiple (already large) patches. Those patches conflicted (parameterised Structured vs. changes to usage checking and FlowGraph) and encountered a nasty bug in darcs 1 involving exponential time (see http://wiki.darcs.net/DarcsWiki/ConflictsFAQ for more details). Reasoning that half an hour (of 100% CPU use) was too long to apply patches, I opted to re-record the parameterised Structured changes as this new large patch. Here are the commit messages originally used for the patches (which, as mentioned, were already large patches):
A gigantic patch switching all the non-test modules over to using parameterised A.Structured
Changed the FlowGraph module again to handle any sort of Structured you want to pass to it (mainly for testing)
A further gigantic patch changing all the tests to work with the new parameterised Structured
Fixed a nasty bug involving functions being named incorrectly inside transformInputCase
Added a hand-written instance of Data for Structured that allows us to use ext1M properly
Fixed a few warnings in the code