Changeset 27 for sizechecking/branches/macs/Tests
- Timestamp:
- May 5, 2014, 3:10:33 PM (11 years ago)
- Location:
- sizechecking/branches/macs/Tests
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sizechecking/branches/macs/Tests/ExpTest.hs
r24 r27 30 30 testD2Cons = cons (cons (lit 1) nil) nil 31 31 32 checkAST :: S a -> String -> IO Bool32 checkAST :: S SData a -> String -> IO Bool 33 33 checkAST exp repr = ast exp >>= (\t -> return $ t "" == repr ) 34 34 -
sizechecking/branches/macs/Tests/SizeTest.hs
r24 r27 21 21 testTail = slam $ \s f -> list (s - lit 1) f 22 22 23 testAddOne :: (Size l) => l ([Unsized] -> [Unsized]) 24 testAddOne = slam $ \s f -> list (s + lit 1) (lam $ const unsized) 25 23 26 testCons :: Size l => l (a -> [a] -> [a]) 24 27 testCons = lam $ \x -> slam $ \s f -> 25 28 list (s + lit 1) $ shift f s (lam $ const x) 26 29 27 checkAst :: S a -> String -> IO Bool 30 testConcat :: Size l => l ([a] -> [a] -> [a]) 31 testConcat = slam $ \s1 f1 -> slam $ \s2 f2 -> 32 list (s1 + s2) $ shift f1 s1 f2 33 34 35 checkAst :: S SData a -> String -> IO Bool 28 36 checkAst exp repr = ast exp >>= (\t -> return $ t "" == repr) 29 37
Note: See TracChangeset
for help on using the changeset viewer.