summaryrefslogtreecommitdiff
path: root/lib/top.ur
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-10-21 19:31:11 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-10-21 19:31:11 -0400
commit29ee4365f5e19e5eccfa57252cca0bd0f0600ba9 (patch)
tree92c48b30a7960f6c43da6de37013afd0b7f9af5a /lib/top.ur
parent17b3f5af99c07d7361fb99124412aff1768cfe13 (diff)
Infering sum rows
Diffstat (limited to 'lib/top.ur')
-rw-r--r--lib/top.ur4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/top.ur b/lib/top.ur
index 9ba26068..ab506c80 100644
--- a/lib/top.ur
+++ b/lib/top.ur
@@ -31,8 +31,8 @@ fun foldUR (tf :: Type) (tr :: {Unit} -> Type)
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)