annotate lib/ur/list.urs @ 1535:27190faa36a3

Handle case where shakeExp can remove datatype.
author Karn Kallio <kkallio@eka>
date Sat, 13 Aug 2011 00:07:28 -0430
parents ada582d07ae1
children dde3bd82cb3d
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@1057 11 val foldr : a ::: Type -> b ::: Type -> (a -> b -> b) -> b -> t a -> b
adamc@1057 12
adamc@916 13 val length : a ::: Type -> t a -> int
adamc@916 14
adamc@794 15 val rev : a ::: Type -> t a -> t a
adamc@794 16
adamc@821 17 val revAppend : a ::: Type -> t a -> t a -> t a
adamc@821 18
adamc@821 19 val append : a ::: Type -> t a -> t a -> t a
adamc@821 20
adamc@794 21 val mp : a ::: Type -> b ::: Type -> (a -> b) -> t a -> t b
adamc@794 22
adamc@821 23 val mapPartial : a ::: Type -> b ::: Type -> (a -> option b) -> t a -> t b
adamc@821 24
adamc@1279 25 val mapi : a ::: Type -> b ::: Type -> (int -> a -> b) -> t a -> t b
adamc@1279 26
adamc@796 27 val mapX : a ::: Type -> ctx ::: {Unit} -> (a -> xml ctx [] []) -> t a -> xml ctx [] []
adamc@800 28
adamc@800 29 val mapM : m ::: (Type -> Type) -> monad m -> a ::: Type -> b ::: Type
adamc@830 30 -> (a -> m b) -> t a -> m (t b)
adamc@830 31
adamc@1107 32 val mapPartialM : m ::: (Type -> Type) -> monad m -> a ::: Type -> b ::: Type -> (a -> m (option b)) -> t a -> m (t b)
adamc@1107 33
adamc@830 34 val mapXM : m ::: (Type -> Type) -> monad m -> a ::: Type -> ctx ::: {Unit}
adamc@830 35 -> (a -> m (xml ctx [] [])) -> t a -> m (xml ctx [] [])
adamc@821 36
adamc@821 37 val filter : a ::: Type -> (a -> bool) -> t a -> t a
adamc@822 38
adamc@822 39 val exists : a ::: Type -> (a -> bool) -> t a -> bool
adamc@822 40
adamc@840 41 val foldlM : m ::: (Type -> Type) -> monad m -> a ::: Type -> b ::: Type
adamc@840 42 -> (a -> b -> m b) -> b -> t a -> m b
adamc@840 43
adamc@822 44 val foldlMap : a ::: Type -> b ::: Type -> c ::: Type
adamc@822 45 -> (a -> b -> c * b) -> b -> t a -> t c * b
adamc@839 46
adam@1519 47 val find : a ::: Type -> (a -> bool) -> t a -> option a
adam@1519 48
adamc@839 49 val search : a ::: Type -> b ::: Type -> (a -> option b) -> t a -> option b
adamc@843 50
adamc@843 51 val all : a ::: Type -> (a -> bool) -> t a -> bool
adamc@844 52
adamc@844 53 val app : m ::: (Type -> Type) -> monad m -> a ::: Type
adamc@844 54 -> (a -> m unit) -> t a -> m unit
adamc@845 55
adamc@908 56 val mapQuery : tables ::: {{Type}} -> exps ::: {Type} -> t ::: Type
adamc@908 57 -> [tables ~ exps] =>
adam@1394 58 sql_query [] [] tables exps
adamc@908 59 -> ($(exps ++ map (fn fields :: {Type} => $fields) tables) -> t)
adamc@908 60 -> transaction (list t)
adamc@845 61
adamc@1107 62 val mapQueryM : tables ::: {{Type}} -> exps ::: {Type} -> t ::: Type
adamc@1107 63 -> [tables ~ exps] =>
adam@1394 64 sql_query [] [] tables exps
adamc@1107 65 -> ($(exps ++ map (fn fields :: {Type} => $fields) tables) -> transaction t)
adamc@1107 66 -> transaction (list t)
adamc@1107 67
adamc@1107 68 val mapQueryPartialM : tables ::: {{Type}} -> exps ::: {Type} -> t ::: Type
adamc@1107 69 -> [tables ~ exps] =>
adam@1394 70 sql_query [] [] tables exps
adamc@1107 71 -> ($(exps ++ map (fn fields :: {Type} => $fields) tables) -> transaction (option t))
adamc@1107 72 -> transaction (list t)
adamc@1107 73
adam@1321 74 val sort : a ::: Type -> (a -> a -> bool) (* > predicate *) -> t a -> t a
adam@1321 75
adam@1322 76 val nth : a ::: Type -> list a -> int -> option a
adam@1345 77 val replaceNth : a ::: Type -> list a -> int -> a -> list a
adam@1322 78
adamc@845 79 (** Association lists *)
adamc@845 80
adamc@845 81 val assoc : a ::: Type -> b ::: Type -> eq a -> a -> t (a * b) -> option b
adamc@845 82
adamc@845 83 val assocAdd : a ::: Type -> b ::: Type -> eq a -> a -> b -> t (a * b) -> t (a * b)
greenrd@1481 84
greenrd@1481 85 (** Converting records to lists *)
greenrd@1481 86
greenrd@1481 87 val recToList : a ::: Type -> r ::: {Unit} -> folder r -> $(mapU a r) -> t a