Mercurial > urweb
annotate lib/ur/list.urs @ 834:74e9e7642f08
Do 'open constraints' automatically; fix sourceless <cselect> monoize bug; Monad library module
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 02 Jun 2009 11:50:53 -0400 |
parents | d07980bf1444 |
children | b2413e4dd109 |
rev | line source |
---|---|
adamc@794 | 1 datatype t = datatype Basis.list |
adamc@794 | 2 |
adamc@794 | 3 val show : a ::: Type -> show a -> show (list a) |
adamc@794 | 4 |
adamc@794 | 5 val rev : a ::: Type -> t a -> t a |
adamc@794 | 6 |
adamc@821 | 7 val revAppend : a ::: Type -> t a -> t a -> t a |
adamc@821 | 8 |
adamc@821 | 9 val append : a ::: Type -> t a -> t a -> t a |
adamc@821 | 10 |
adamc@794 | 11 val mp : a ::: Type -> b ::: Type -> (a -> b) -> t a -> t b |
adamc@794 | 12 |
adamc@821 | 13 val mapPartial : a ::: Type -> b ::: Type -> (a -> option b) -> t a -> t b |
adamc@821 | 14 |
adamc@796 | 15 val mapX : a ::: Type -> ctx ::: {Unit} -> (a -> xml ctx [] []) -> t a -> xml ctx [] [] |
adamc@800 | 16 |
adamc@800 | 17 val mapM : m ::: (Type -> Type) -> monad m -> a ::: Type -> b ::: Type |
adamc@830 | 18 -> (a -> m b) -> t a -> m (t b) |
adamc@830 | 19 |
adamc@830 | 20 val mapXM : m ::: (Type -> Type) -> monad m -> a ::: Type -> ctx ::: {Unit} |
adamc@830 | 21 -> (a -> m (xml ctx [] [])) -> t a -> m (xml ctx [] []) |
adamc@821 | 22 |
adamc@821 | 23 val filter : a ::: Type -> (a -> bool) -> t a -> t a |
adamc@822 | 24 |
adamc@822 | 25 val exists : a ::: Type -> (a -> bool) -> t a -> bool |
adamc@822 | 26 |
adamc@822 | 27 val foldlMap : a ::: Type -> b ::: Type -> c ::: Type |
adamc@822 | 28 -> (a -> b -> c * b) -> b -> t a -> t c * b |