Commit Graph

9 Commits

Author SHA1 Message Date
Neil Brown
c8b724d2be Merged the latest set of changes from the trunk into the Polyplate branch
I also added the import list to all the Data.Generics imports in the tests (as I did for the other modules recently)
2009-04-10 20:38:29 +00:00
Neil Brown
ccb6c7aa1d Fixed the types in various test modules to work with Polyplate 2008-12-14 19:18:00 +00:00
Neil Brown
ddbec737f2 Got all the tests compiling again after recent changes
For some reason, the usage check tests are now very slow to run (perhaps because of all the operator definitions added to each one?), which needs further investigation.
2009-04-10 19:29:40 +00:00
Neil Brown
ba66cce89f Moved all the remaining pass information to be with the passes themselves, and adjusted the tests accordingly
All the passes now have their information (name, pre-requisites and post- properties) stored at the point where the pass is declared, which means the pass lists are just a simple list of pass functions.

The main consequence of this change was that the tests had to be changed.  Now, instead of taking a "pass applied to data" item (type: PassM b), they take both the pass (type: Pass) and source data (type: b), and apply them later.  This was the decision that involved the simplest changes to the existing tests (simply unbracketing the application of the pass to the source).  I also had to include a few old-style versions though (testPass', testPassShouldFail') for where the functions were being used to test things that weren't actually passes (mainly StructureOccam).

Fixes #48
2008-06-02 14:31:19 +00:00
Adam Sampson
8f7c8b9fcb Define variables necessary for some of the constant-folding tests. 2008-04-06 13:12:04 +00:00
Adam Sampson
b36068b815 Move retypes check into the SpecType checker, and update the pass list.
This completes the occam typechecker.
2008-03-26 14:39:12 +00:00
Adam Sampson
e08aac59d3 Move Retypes checking from the occam parser into a pass.
This also fixes a bug in the original algorithm: it used to let you retype
[]INT to BYTE.
2008-03-19 19:38:56 +00:00
Adam Sampson
79eefd5e98 Move constant checking from the occam parser into a pass.
The parser now doesn't do any constant folding or checking.
2008-03-19 12:47:29 +00:00
Adam Sampson
3005dfb506 Add a pass for folding constants in occam.
The existing constant-folding code in the parser is still there, since it needs
to know whether things are constant, and A.Dimension expects an Int.

However, this pass is useful because it does a better job of constant folding
than the parser would on its own: it can fold subexpressions of expressions
that are as a whole not constant.
2008-03-17 15:48:43 +00:00