From 02a28b758538eb34dc48e59cb58c1b850be872b6 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Sat, 15 Nov 2008 20:13:33 +0000 Subject: [PATCH] Made testOccamPass more general, so that it does not have to be applied at the top-level --- common/OccamEDSL.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/OccamEDSL.hs b/common/OccamEDSL.hs index 5f3b710..11e06e2 100644 --- a/common/OccamEDSL.hs +++ b/common/OccamEDSL.hs @@ -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