summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2010-10-17 13:26:11 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2010-10-17 13:26:11 -0400
commit0e953baf0594e5107df747bb611e34a4d63064b5 (patch)
tree92cc696c1a66e0e4a5bf035bdbe704a9d4edb155
parentdc136c3a267dafb7ba1fb0acbc4a76d5430bc00d (diff)
Simplify type of Monad.appR2
-rw-r--r--lib/ur/monad.ur6
-rw-r--r--lib/ur/monad.urs4
2 files changed, 3 insertions, 7 deletions
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