From 25838bc2eb221b82151c648473b3528e3a4e4e9d Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Sun, 17 Oct 2010 13:26:11 -0400 Subject: Simplify type of Monad.appR2 --- lib/ur/monad.ur | 6 ++---- lib/ur/monad.urs | 4 +--- 2 files changed, 3 insertions(+), 7 deletions(-) (limited to 'lib') diff --git a/lib/ur/monad.ur b/lib/ur/monad.ur index 4fc1de87..487aef26 100644 --- a/lib/ur/monad.ur +++ b/lib/ur/monad.ur @@ -94,13 +94,11 @@ fun foldMapR [K] [m] (_ : monad m) [tf :: K -> Type] [tf' :: K -> Type] [tr :: { 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 --git a/lib/ur/monad.urs b/lib/ur/monad.urs index 7bac8756..be3b59ab 100644 --- a/lib/ur/monad.urs +++ b/lib/ur/monad.urs @@ -63,7 +63,5 @@ val foldMapR : K --> m ::: (Type -> Type) -> monad m 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 -- cgit v1.2.3