diff options
author | 2008-06-08 15:47:44 -0400 | |
---|---|---|
committer | 2008-06-08 15:47:44 -0400 | |
commit | e18863bcabc5d185b7fe1fc750bdf0bbdb5a4f78 (patch) | |
tree | 180c8271605929d6c902c4dda9b8b756ff0e1fda /tests/reduce.lac | |
parent | b0bf85209e8ddd4937393908d953f451556e73e9 (diff) |
Some con reducing
Diffstat (limited to 'tests/reduce.lac')
-rw-r--r-- | tests/reduce.lac | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/reduce.lac b/tests/reduce.lac new file mode 100644 index 00000000..a6fa1e94 --- /dev/null +++ b/tests/reduce.lac @@ -0,0 +1,19 @@ +con c1 = int +con c2 = (fn t :: Type => t) int + +con id = fn t :: Type => t +con c3 = id int + +con fst = fn t1 :: Type => fn t2 :: Type => t1 +con c4 = fst int string + +con snd = fn t1 :: Type => fn t2 :: Type => t2 +con c5 = snd int string + +con apply = fn f :: Type -> Type => fn t :: Type => f t +con c6 = apply id int +con c7 = apply (fst int) string + +val grab = fn n :: Name => fn t :: Type => fn fs :: {Type} => + fn x : $([n = t] ++ fs) => x +val grabA = grab[#A][int][[B = string]] |