diff lib/ur/top.urs @ 637:24fd1edfcaa3

Kind-polymorphic [fst] and friends
author Adam Chlipala <adamc@hcoop.net>
date Thu, 26 Feb 2009 16:16:54 -0500
parents 6c4643880df5
children aa2290c32ce2
line wrap: on
line diff
--- a/lib/ur/top.urs	Thu Feb 26 13:56:54 2009 -0500
+++ b/lib/ur/top.urs	Thu Feb 26 16:16:54 2009 -0500
@@ -23,11 +23,11 @@
 
 con idT = fn t :: Type => t
 con record = fn t :: {Type} => $t
-con fstTT = fn t :: (Type * Type) => t.1
-con sndTT = fn t :: (Type * Type) => t.2
-con fstTTT = fn t :: (Type * Type * Type) => t.1
-con sndTTT = fn t :: (Type * Type * Type) => t.2
-con thdTTT = fn t :: (Type * Type * Type) => t.3
+con fst = K1 ==> K2 ==> fn t :: (K1 * K2) => t.1
+con snd = K1 ==> K2 ==> fn t :: (K1 * K2) => t.2
+con fst3 = K1 ==> K2 ==> K3 ==> fn t :: (K1 * K2 * K3) => t.1
+con snd3 = K1 ==> K2 ==> K3 ==> fn t :: (K1 * K2 * K3) => t.2
+con thd3 = K1 ==> K2 ==> K3 ==> fn t :: (K1 * K2 * K3) => t.3
 
 con mapUT = fn f :: Type => map (fn _ :: Unit => f)