Mercurial > meta
comparison record.urs @ 28:f55f66c6fdee
Migrate ap method to Record module.
author | Edward Z. Yang <ezyang@mit.edu> |
---|---|
date | Thu, 26 Jul 2012 16:48:37 -0400 |
parents | a6730c3cfea7 |
children |
comparison
equal
deleted
inserted
replaced
27:ca1c07d49b5e | 28:f55f66c6fdee |
---|---|
3 val mem : a ::: Type -> ns ::: {Unit} -> eq a -> folder ns -> a -> $(mapU a ns) -> bool | 3 val mem : a ::: Type -> ns ::: {Unit} -> eq a -> folder ns -> a -> $(mapU a ns) -> bool |
4 (* Is a value found in a record? *) | 4 (* Is a value found in a record? *) |
5 | 5 |
6 val equal : ts ::: {Type} -> $(map eq ts) -> folder ts -> $ts -> $ts -> bool | 6 val equal : ts ::: {Type} -> $(map eq ts) -> folder ts -> $ts -> $ts -> bool |
7 (* Are two records equal? *) | 7 (* Are two records equal? *) |
8 | |
9 (* Analogous to applicative ap e.g. <*>, of type [f (a -> b) -> f a -> f b] *) | |
10 val ap : K --> tf1 :: (K -> Type) -> tf2 :: (K -> Type) | |
11 -> r ::: {K} -> folder r | |
12 -> $(map (fn t => tf1 t -> tf2 t) r) | |
13 -> $(map tf1 r) | |
14 -> $(map tf2 r) |