Changeset 14 for sizechecking/Examples.hs
- Timestamp:
- Nov 16, 2012, 10:38:01 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sizechecking/Examples.hs
r12 r14 46 46 47 47 t27 :: (SizedExp se) => Size se ((a -> a) -> a -> a) 48 t27 = bind ( 48 t27 = bind (App t3s t3s) $ t3 `app` t3 49 49 50 50 t27_ :: (SizedExp se) => Size se ((a -> a) -> a -> a) 51 t27_ = bind ( 51 t27_ = bind (App t3s t3s) $ 52 52 \f -> t3 `app` t3 `app` f 53 53 54 54 t27__ :: (SizedExp se) => Size se ((a -> a) -> a -> a) 55 t27__ = bind ( 55 t27__ = bind (App t3s t3s) $ \f x -> 56 56 t3 `app` t3 `app` f `app` x 57 57 … … 216 216 217 217 218 test2s = Abs 2 $ AAbs 18 5 $ appends `App` (Var 2 `App` List (Var 18) (Var 5)) `App` List (Var 18) (Var 5) 218 test2s = Abs 2 $ AAbs 18 5 $ appends `App` (Var 2 `App` List (Var 18) (Var 5)) `App` 219 (appends `App` (Var 2 `App` List (Var 18) (Var 5)) `App` List (Var 18) (Var 5)) 219 220 test2 :: (SizedExp se) => Size se (([a] -> [a]) -> [a] -> [a]) 220 test2 = bind test2s $ \f l -> append `app` (f `app` l) `app` l221 test2 = bind test2s $ \f l -> append `app` (f `app` l) `app` (append `app` (f `app` l) `app` l) 221 222 222 223 data TestCase = forall a . TestCase P.String (forall se. SizedExp se => Size se a) … … 234 235 , TestCase "t9" t9 235 236 -- , TestCase "t9_" t9_ -- too few arguments in definition 236 , TestCase "t27" t27237 , TestCase "t27_" t27_237 -- , TestCase "t27" t27 238 -- , TestCase "t27_" t27_ 238 239 , TestCase "t27__" t27__ 239 240 , TestCase "addone" addone … … 251 252 , TestCase "charm" charm 252 253 , TestCase "comp" comp 254 , TestCase "merge" merge 255 , TestCase "split1" split1 256 , TestCase "split2" split2 257 , TestCase "mergesort" mergesort 253 258 ] 254 259
Note: See TracChangeset
for help on using the changeset viewer.