Mercurial > urweb
diff lib/top.ur @ 412:df4cbd90a26e
Infering sum rows
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 21 Oct 2008 19:31:11 -0400 |
parents | 06fcddcd20d3 |
children | ad7e854a518c |
line wrap: on
line diff
--- a/lib/top.ur Tue Oct 21 19:24:39 2008 -0400 +++ b/lib/top.ur Tue Oct 21 19:31:11 2008 -0400 @@ -31,8 +31,8 @@ tf -> tr rest -> tr ([nm] ++ rest)) (i : tr []) = fold [fn r :: {Unit} => $(mapUT tf r) -> tr r] - (fn (nm :: Name) (t :: Unit) (rest :: {Unit}) (acc : $(mapUT tf rest) -> tr rest) - [[nm] ~ rest] (r : $([nm = tf] ++ mapUT tf rest)) => + (fn (nm :: Name) (t :: Unit) (rest :: {Unit}) acc + [[nm] ~ rest] r => f [nm] [rest] r.nm (acc (r -- nm))) (fn _ => i)