From df475a9256347564d3adc1fafc53c4d93b4e73f7 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Sat, 19 May 2012 11:32:12 -0400 Subject: Some standard library additions from Edward Z. Yang --- lib/ur/monad.urs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/ur/monad.urs') diff --git a/lib/ur/monad.urs b/lib/ur/monad.urs index d07d5026..ce823f4a 100644 --- a/lib/ur/monad.urs +++ b/lib/ur/monad.urs @@ -7,6 +7,13 @@ val ignore : m ::: (Type -> Type) -> monad m -> t ::: Type val mp : m ::: (Type -> Type) -> monad m -> a ::: Type -> b ::: Type -> (a -> b) -> m a -> m b +val liftM : m ::: (Type -> Type) -> monad m -> a ::: Type -> b ::: Type + -> (a -> b) -> m a -> m b +(* Haskell-style synonym for [mp] *) + +val liftM2 : m ::: (Type -> Type) -> monad m -> a ::: Type -> b ::: Type -> c ::: Type + -> (a -> b -> c) -> m a -> m b -> m c + val foldR : K --> m ::: (Type -> Type) -> monad m -> tf :: (K -> Type) -> tr :: ({K} -> Type) -- cgit v1.2.3