Neil Brown
4f83187549
Fixed up all the tests in light of the new recursive procs
2009-01-29 00:56:32 +00:00
Neil Brown
ee62c604fc
Renamed our permutations function to permutation to avoid a conflict with a new GHC 6.10 function
2008-11-28 11:28:39 +00:00
Neil Brown
0e7a6c5b98
Added a NameSource field for NameDef that indicates where a name comes from
2008-11-25 17:36:42 +00:00
Neil Brown
e117422c31
Added a couple more tests for checkUnusedVar which has revealed two bugs
...
One of these bugs is that array variables are counted as unused when they are used subscripted. I think that should be solved when we flip back to the listify approach.
The second bug is more interesting, as it is triggered only in a certain arrangement with an IF. It's either a bug in the flow-graph building or in the varsTouchedAfter code.
2008-11-20 15:06:36 +00:00
Neil Brown
5f01f12d43
Adjusted testOccamPassWarn to enable all warnings when testing a pass
2008-11-20 14:20:36 +00:00
Neil Brown
6cbdc0e13b
Finally merged the list of warnings into CompState rather than having its own StateT monad
2008-11-20 13:35:44 +00:00
Neil Brown
38374320a3
Moved the remainder of the checkInitVar tests over to the new system
2008-11-19 17:25:02 +00:00
Neil Brown
3b57d43eb6
Moved more of the checkInitVar tests to the new system
2008-11-19 17:08:17 +00:00
Neil Brown
810c798dac
Added some copies of the checkInitVar tests that use the new occam EDSL testing instead of the old method
2008-11-19 16:53:13 +00:00
Neil Brown
bfacb526fb
Converted one of the tests for pullRepCounts to use the new mechanism, which in turn exposed that the pass was not altering the definition in the state (which it may as well)
2008-11-16 18:25:53 +00:00
Neil Brown
771297632d
Finished converting all the cases in testInputCase to use the new occam EDSL
2008-11-16 16:57:52 +00:00
Neil Brown
9ac861ac93
Fixed the map ordering problem by matching against any permutation
2008-11-16 13:06:08 +00:00
Neil Brown
559ba83c28
Developed the occam EDSL further, adding support for input CASE statements, more type-classes to allow easier use and various other improvements
2008-11-16 12:21:22 +00:00
Neil Brown
02a28b7585
Made testOccamPass more general, so that it does not have to be applied at the top-level
2008-11-15 20:13:33 +00:00
Neil Brown
a570f2eff3
Renamed the variables in the occam EDSL to be less likely to clash in other modules
2008-11-15 20:11:52 +00:00
Neil Brown
f4d9c791ef
Simplified the occam EDSL by removing the unnecessary monad in favour of plain lists, and added a way to separate expected output from input
2008-11-15 20:06:47 +00:00
Neil Brown
7764ed9326
Added a module for easily knocking up fragments of occam code to test, but need to remove some of the extravagance in the design (including an unnecessary monad)
2008-11-15 19:29:56 +00:00