diff tests/reduce.lac @ 22:d8850cc06d24

Reducing known record projections
author Adam Chlipala <adamc@hcoop.net>
date Sun, 08 Jun 2008 16:08:31 -0400
parents 067029c748e9
children bfa2e9ae4df8
line wrap: on
line diff
--- a/tests/reduce.lac	Sun Jun 08 16:02:26 2008 -0400
+++ b/tests/reduce.lac	Sun Jun 08 16:08:31 2008 -0400
@@ -14,7 +14,12 @@
 con c6 = apply id int
 con c7 = apply (fst int) string
 
-val grab = fn n :: Name => fn t :: Type => fn fs :: {Type} =>
+val tickle = fn n :: Name => fn t :: Type => fn fs :: {Type} =>
         fn x : $([n = t] ++ fs) => x
-val grabA = grab[#A][int][[B = string]]
-val test_grabA = grabA {A = 6, B = "13"}
+val tickleA = tickle[#A][int][[B = string]]
+val test_tickleA = tickleA {A = 6, B = "13"}
+
+val grab = fn n :: Name => fn t ::: Type => fn fs ::: {Type} =>
+        fn x : $([n = t] ++ fs) => x.n
+val test_grab1 = grab[#A] {A = 6, B = "13"}
+val test_grab2 = grab[#B] {A = 6, B = "13"}