comparison lib/ur/monad.urs @ 1768:a613cae954ca

Some standard library additions from Edward Z. Yang
author Adam Chlipala <adam@chlipala.net>
date Sat, 19 May 2012 11:32:12 -0400
parents 0bf73c3e4563
children cbd294994c69
comparison
equal deleted inserted replaced
1766:92cfc69419bd 1768:a613cae954ca
4 val ignore : m ::: (Type -> Type) -> monad m -> t ::: Type 4 val ignore : m ::: (Type -> Type) -> monad m -> t ::: Type
5 -> m t -> m unit 5 -> m t -> m unit
6 6
7 val mp : m ::: (Type -> Type) -> monad m -> a ::: Type -> b ::: Type 7 val mp : m ::: (Type -> Type) -> monad m -> a ::: Type -> b ::: Type
8 -> (a -> b) -> m a -> m b 8 -> (a -> b) -> m a -> m b
9
10 val liftM : m ::: (Type -> Type) -> monad m -> a ::: Type -> b ::: Type
11 -> (a -> b) -> m a -> m b
12 (* Haskell-style synonym for [mp] *)
13
14 val liftM2 : m ::: (Type -> Type) -> monad m -> a ::: Type -> b ::: Type -> c ::: Type
15 -> (a -> b -> c) -> m a -> m b -> m c
9 16
10 val foldR : K --> m ::: (Type -> Type) -> monad m 17 val foldR : K --> m ::: (Type -> Type) -> monad m
11 -> tf :: (K -> Type) 18 -> tf :: (K -> Type)
12 -> tr :: ({K} -> Type) 19 -> tr :: ({K} -> Type)
13 -> (nm :: Name -> t :: K -> rest :: {K} 20 -> (nm :: Name -> t :: K -> rest :: {K}