diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-09-08 10:55:49 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-09-08 10:55:49 -0400 |
commit | 33dbb6c0000a5d82267f984191e7390be86b7dfd (patch) | |
tree | 7d2a84baa2e21562b0754815824f223d61a6621a /lib | |
parent | d07c91bf275874a5f6f13af5f338def78eea7ae0 (diff) |
dragList demo working, save for Gecko load delay and highlighting
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ur/monad.ur | 4 | ||||
-rw-r--r-- | lib/ur/monad.urs | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/lib/ur/monad.ur b/lib/ur/monad.ur index d6690839..96c46311 100644 --- a/lib/ur/monad.ur +++ b/lib/ur/monad.ur @@ -8,6 +8,10 @@ fun exec [m ::: Type -> Type] (_ : monad m) [ts ::: {Type}] r (fd : folder ts) = fun ignore [m ::: Type -> Type] (_ : monad m) [t] (v : m t) = x <- v; return () +fun mp [m] (_ : monad m) [a] [b] f m = + v <- m; + return (f v) + fun foldR [K] [m] (_ : monad m) [tf :: K -> Type] [tr :: {K} -> Type] (f : nm :: Name -> t :: K -> rest :: {K} -> [[nm] ~ rest] => diff --git a/lib/ur/monad.urs b/lib/ur/monad.urs index f64e2362..27fe255f 100644 --- a/lib/ur/monad.urs +++ b/lib/ur/monad.urs @@ -4,6 +4,9 @@ val exec : m ::: (Type -> Type) -> monad m -> ts ::: {Type} val ignore : m ::: (Type -> Type) -> monad m -> t ::: Type -> m t -> m unit +val mp : m ::: (Type -> Type) -> monad m -> a ::: Type -> b ::: Type + -> (a -> b) -> m a -> m b + val foldR : K --> m ::: (Type -> Type) -> monad m -> tf :: (K -> Type) -> tr :: ({K} -> Type) |