# HG changeset patch # User Adam Chlipala # Date 1287336371 14400 # Node ID f0909fb3848f08ab77e5b7efd98abce1bc52486f # Parent 127561e4aef165ff0beb796f823b92312ef913f8 Simplify type of Monad.appR2 diff -r 127561e4aef1 -r f0909fb3848f lib/ur/monad.ur --- a/lib/ur/monad.ur Thu Oct 14 11:54:54 2010 -0400 +++ b/lib/ur/monad.ur Sun Oct 17 13:26:11 2010 -0400 @@ -94,13 +94,11 @@ fl fun appR2 [K] [m] (_ : monad m) [tf1 :: K -> Type] [tf2 :: K -> Type] - (f : nm :: Name -> t :: K -> rest :: {K} - -> [[nm] ~ rest] => - tf1 t -> tf2 t -> m unit) + (f : nm :: Name -> t :: K -> tf1 t -> tf2 t -> m unit) [r ::: {K}] (fl : folder r) = @Top.fold [fn r :: {K} => $(map tf1 r) -> $(map tf2 r) -> m unit] (fn [nm :: Name] [t :: K] [rest :: {K}] [[nm] ~ rest] acc r1 r2 => acc (r1 -- nm) (r2 -- nm); - f [nm] [t] [rest] ! r1.nm r2.nm) + f [nm] [t] r1.nm r2.nm) (fn _ _ => return ()) fl diff -r 127561e4aef1 -r f0909fb3848f lib/ur/monad.urs --- a/lib/ur/monad.urs Thu Oct 14 11:54:54 2010 -0400 +++ b/lib/ur/monad.urs Sun Oct 17 13:26:11 2010 -0400 @@ -63,7 +63,5 @@ val appR2 : K --> m ::: (Type -> Type) -> monad m -> tf1 :: (K -> Type) -> tf2 :: (K -> Type) - -> (nm :: Name -> t :: K -> rest :: {K} - -> [[nm] ~ rest] => - tf1 t -> tf2 t -> m unit) + -> (nm :: Name -> t :: K -> tf1 t -> tf2 t -> m unit) -> r ::: {K} -> folder r -> $(map tf1 r) -> $(map tf2 r) -> m unit