Ignore:
Timestamp:
May 5, 2014, 3:10:33 PM (11 years ago)
Author:
gobi
Message:

new files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sizechecking/branches/macs/Tests/SizeTest.hs

    r24 r27  
    2121testTail = slam $ \s f -> list (s - lit 1) f 
    2222 
     23testAddOne :: (Size l) => l ([Unsized] -> [Unsized]) 
     24testAddOne = slam $ \s f -> list (s + lit 1) (lam $ const unsized) 
     25 
    2326testCons :: Size l => l (a -> [a] -> [a]) 
    2427testCons = lam $ \x -> slam $ \s f -> 
    2528    list (s + lit 1) $ shift f s (lam $ const x) 
    2629 
    27 checkAst :: S a -> String -> IO Bool 
     30testConcat :: Size l => l ([a] -> [a] -> [a]) 
     31testConcat = slam $ \s1 f1 -> slam $ \s2 f2 -> 
     32    list (s1 + s2) $ shift f1 s1 f2 
     33 
     34 
     35checkAst :: S SData a -> String -> IO Bool 
    2836checkAst exp repr = ast exp >>= (\t -> return $ t "" == repr) 
    2937 
Note: See TracChangeset for help on using the changeset viewer.