Mercurial > meta
diff record.ur @ 12:a6730c3cfea7
Record.equal
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Tue, 08 Feb 2011 16:52:41 -0500 |
parents | 67b33be5d56a |
children | 6cd839818393 |
line wrap: on
line diff
--- a/record.ur Thu Feb 03 14:22:02 2011 -0500 +++ b/record.ur Tue Feb 08 16:52:41 2011 -0500 @@ -6,3 +6,9 @@ (fn [nm ::_] [r ::_] [[nm] ~ r] y acc => acc || x = y) False fl r + +fun equal [ts ::: {Type}] (eqs : $(map eq ts)) (fl : folder ts) (r1 : $ts) (r2 : $ts) : bool = + @foldR3 [eq] [id] [id] [fn _ => bool] + (fn [nm ::_] [t ::_] [r ::_] [[nm] ~ r] isEq x y acc => + acc && @eq isEq x y) + True fl eqs r1 r2