annotate lib/ur/list.urs @ 1014:ea9f03ac2710

Chars working with SQLite
author Adam Chlipala <adamc@hcoop.net>
date Thu, 22 Oct 2009 17:36:30 -0400
parents b873feb3eb52
children eaba663fd6aa
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@850 7 val foldlAbort : a ::: Type -> b ::: Type -> (a -> b -> option b) -> b -> t a -> option b
adamc@850 8 val foldlMapAbort : a ::: Type -> b ::: Type -> c ::: Type
adamc@850 9 -> (a -> b -> option (c * b)) -> b -> t a -> option (t c * b)
adamc@845 10
adamc@916 11 val length : a ::: Type -> t a -> int
adamc@916 12
adamc@794 13 val rev : a ::: Type -> t a -> t a
adamc@794 14
adamc@821 15 val revAppend : a ::: Type -> t a -> t a -> t a
adamc@821 16
adamc@821 17 val append : a ::: Type -> t a -> t a -> t a
adamc@821 18
adamc@794 19 val mp : a ::: Type -> b ::: Type -> (a -> b) -> t a -> t b
adamc@794 20
adamc@821 21 val mapPartial : a ::: Type -> b ::: Type -> (a -> option b) -> t a -> t b
adamc@821 22
adamc@796 23 val mapX : a ::: Type -> ctx ::: {Unit} -> (a -> xml ctx [] []) -> t a -> xml ctx [] []
adamc@800 24
adamc@800 25 val mapM : m ::: (Type -> Type) -> monad m -> a ::: Type -> b ::: Type
adamc@830 26 -> (a -> m b) -> t a -> m (t b)
adamc@830 27
adamc@830 28 val mapXM : m ::: (Type -> Type) -> monad m -> a ::: Type -> ctx ::: {Unit}
adamc@830 29 -> (a -> m (xml ctx [] [])) -> t a -> m (xml ctx [] [])
adamc@821 30
adamc@821 31 val filter : a ::: Type -> (a -> bool) -> t a -> t a
adamc@822 32
adamc@822 33 val exists : a ::: Type -> (a -> bool) -> t a -> bool
adamc@822 34
adamc@840 35 val foldlM : m ::: (Type -> Type) -> monad m -> a ::: Type -> b ::: Type
adamc@840 36 -> (a -> b -> m b) -> b -> t a -> m b
adamc@840 37
adamc@822 38 val foldlMap : a ::: Type -> b ::: Type -> c ::: Type
adamc@822 39 -> (a -> b -> c * b) -> b -> t a -> t c * b
adamc@839 40
adamc@839 41 val search : a ::: Type -> b ::: Type -> (a -> option b) -> t a -> option b
adamc@843 42
adamc@843 43 val all : a ::: Type -> (a -> bool) -> t a -> bool
adamc@844 44
adamc@844 45 val app : m ::: (Type -> Type) -> monad m -> a ::: Type
adamc@844 46 -> (a -> m unit) -> t a -> m unit
adamc@845 47
adamc@908 48 val mapQuery : tables ::: {{Type}} -> exps ::: {Type} -> t ::: Type
adamc@908 49 -> [tables ~ exps] =>
adamc@908 50 sql_query tables exps
adamc@908 51 -> ($(exps ++ map (fn fields :: {Type} => $fields) tables) -> t)
adamc@908 52 -> transaction (list t)
adamc@845 53
adamc@845 54 (** Association lists *)
adamc@845 55
adamc@845 56 val assoc : a ::: Type -> b ::: Type -> eq a -> a -> t (a * b) -> option b
adamc@845 57
adamc@845 58 val assocAdd : a ::: Type -> b ::: Type -> eq a -> a -> b -> t (a * b) -> t (a * b)