view demo/more/dlist.urs @ 944:da3ec6014d2f

Filters implementation type-checking
author Adam Chlipala <adamc@hcoop.net>
date Tue, 15 Sep 2009 15:48:53 -0400
parents 37dd42935dad
children 103ac1792c41
line wrap: on
line source
con dlist :: Type -> Type
type position

val create : t ::: Type -> {Filter : t -> signal bool} -> transaction (dlist t)
val clear : t ::: Type -> dlist t -> transaction unit
val append : t ::: Type -> dlist t -> t -> transaction position
val delete : position -> transaction unit
val elements : t ::: Type -> dlist t -> signal (list t)
val foldl : t ::: Type -> acc ::: Type -> (t -> acc -> signal acc) -> acc -> dlist t -> signal acc

val render : ctx ::: {Unit} -> [ctx ~ body] => t ::: Type
             -> (t -> position -> xml (ctx ++ body) [] [])
             -> dlist t
             -> xml (ctx ++ body) [] []