Made testOccamPass more general, so that it does not have to be applied at the top-level

This commit is contained in:
Neil Brown 2008-11-15 20:13:33 +00:00
parent a570f2eff3
commit 02a28b7585

View File

@ -211,9 +211,9 @@ instance CanBeExpression Int where
oempty :: Data a => O (A.Structured a)
oempty = return $ A.Several emptyMeta []
testOccamPass :: String -> O A.AST -> Pass -> Test
testOccamPass :: Data a => String -> O a -> Pass -> Test
testOccamPass str code pass
= let ExpInpT expm inpm = liftM singlify code
= let ExpInpT expm inpm = code
(exp, expS) = runState expm emptyState
(inp, inpS) = runState inpm emptyState
in TestCase $ testPassWithStateCheck str exp pass inp (put inpS) (assertEqual