annotate record.urs @ 29:7530b2b54353

Update for Ur/Web's new type class handling
author Adam Chlipala <adam@chlipala.net>
date Sun, 29 Jul 2012 12:27:36 -0400
parents f55f66c6fdee
children
rev   line source
adam@11 1 val numFields : r ::: {Type} -> folder r -> $r -> int
adam@11 2
adam@10 3 val mem : a ::: Type -> ns ::: {Unit} -> eq a -> folder ns -> a -> $(mapU a ns) -> bool
adam@10 4 (* Is a value found in a record? *)
adam@12 5
adam@12 6 val equal : ts ::: {Type} -> $(map eq ts) -> folder ts -> $ts -> $ts -> bool
adam@12 7 (* Are two records equal? *)
ezyang@28 8
ezyang@28 9 (* Analogous to applicative ap e.g. <*>, of type [f (a -> b) -> f a -> f b] *)
ezyang@28 10 val ap : K --> tf1 :: (K -> Type) -> tf2 :: (K -> Type)
ezyang@28 11 -> r ::: {K} -> folder r
ezyang@28 12 -> $(map (fn t => tf1 t -> tf2 t) r)
ezyang@28 13 -> $(map tf1 r)
ezyang@28 14 -> $(map tf2 r)