annotate lib/ur/list.urs @ 846:0d30e6338c65

Some standard library reorgs and additions; handle mutual datatypes better in Specialize
author Adam Chlipala <adamc@hcoop.net>
date Tue, 09 Jun 2009 18:11:59 -0400
parents 6725d73c3c31
children 1c2f335297b7
rev   line source
adamc@794 1 datatype t = datatype Basis.list
adamc@794 2
adamc@846 3 val show : a ::: Type -> show a -> show (t a)
adamc@846 4 val eq : a ::: Type -> eq a -> eq (t a)
adamc@794 5
adamc@845 6 val foldl : a ::: Type -> b ::: Type -> (a -> b -> b) -> b -> t a -> b
adamc@846 7 val foldlPartial : a ::: Type -> b ::: Type -> (a -> b -> option b) -> b -> t a -> option b
adamc@845 8
adamc@794 9 val rev : a ::: Type -> t a -> t a
adamc@794 10
adamc@821 11 val revAppend : a ::: Type -> t a -> t a -> t a
adamc@821 12
adamc@821 13 val append : a ::: Type -> t a -> t a -> t a
adamc@821 14
adamc@794 15 val mp : a ::: Type -> b ::: Type -> (a -> b) -> t a -> t b
adamc@794 16
adamc@821 17 val mapPartial : a ::: Type -> b ::: Type -> (a -> option b) -> t a -> t b
adamc@821 18
adamc@796 19 val mapX : a ::: Type -> ctx ::: {Unit} -> (a -> xml ctx [] []) -> t a -> xml ctx [] []
adamc@800 20
adamc@800 21 val mapM : m ::: (Type -> Type) -> monad m -> a ::: Type -> b ::: Type
adamc@830 22 -> (a -> m b) -> t a -> m (t b)
adamc@830 23
adamc@830 24 val mapXM : m ::: (Type -> Type) -> monad m -> a ::: Type -> ctx ::: {Unit}
adamc@830 25 -> (a -> m (xml ctx [] [])) -> t a -> m (xml ctx [] [])
adamc@821 26
adamc@821 27 val filter : a ::: Type -> (a -> bool) -> t a -> t a
adamc@822 28
adamc@822 29 val exists : a ::: Type -> (a -> bool) -> t a -> bool
adamc@822 30
adamc@840 31 val foldlM : m ::: (Type -> Type) -> monad m -> a ::: Type -> b ::: Type
adamc@840 32 -> (a -> b -> m b) -> b -> t a -> m b
adamc@840 33
adamc@822 34 val foldlMap : a ::: Type -> b ::: Type -> c ::: Type
adamc@822 35 -> (a -> b -> c * b) -> b -> t a -> t c * b
adamc@839 36
adamc@839 37 val search : a ::: Type -> b ::: Type -> (a -> option b) -> t a -> option b
adamc@843 38
adamc@843 39 val all : a ::: Type -> (a -> bool) -> t a -> bool
adamc@844 40
adamc@844 41 val app : m ::: (Type -> Type) -> monad m -> a ::: Type
adamc@844 42 -> (a -> m unit) -> t a -> m unit
adamc@845 43
adamc@845 44
adamc@845 45 (** Association lists *)
adamc@845 46
adamc@845 47 val assoc : a ::: Type -> b ::: Type -> eq a -> a -> t (a * b) -> option b
adamc@845 48
adamc@845 49 val assocAdd : a ::: Type -> b ::: Type -> eq a -> a -> b -> t (a * b) -> t (a * b)