diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-03-10 10:44:26 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-03-10 10:44:26 -0400 |
commit | db7cd221444afce64803e66594d56dc8e7a0843c (patch) | |
tree | da2a0ab3f900743c5d1aaa01d30b665aa858f021 /lib | |
parent | aed3aa32e62846a16da55fc7be4cecba92ed5e2b (diff) |
Avoid any JavaScript when pages don't need it; update demo prose
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ur/top.ur | 6 | ||||
-rw-r--r-- | lib/ur/top.urs | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/ur/top.ur b/lib/ur/top.ur index 053075bd..f4adaba7 100644 --- a/lib/ur/top.ur +++ b/lib/ur/top.ur @@ -55,7 +55,7 @@ con fst3 = K1 ==> K2 ==> K3 ==> fn t :: (K1 * K2 * K3) => t.1 con snd3 = K1 ==> K2 ==> K3 ==> fn t :: (K1 * K2 * K3) => t.2 con thd3 = K1 ==> K2 ==> K3 ==> fn t :: (K1 * K2 * K3) => t.3 -con mapUT = fn f :: Type => map (fn _ :: Unit => f) +con mapU = K ==> fn f :: K => map (fn _ :: Unit => f) con ex = fn tf :: (Type -> Type) => res ::: Type -> (choice :: Type -> tf choice -> res) -> res @@ -75,7 +75,7 @@ fun foldUR (tf :: Type) (tr :: {Unit} -> Type) -> [[nm] ~ rest] => tf -> tr rest -> tr ([nm] ++ rest)) (i : tr []) (r :: {Unit}) (fold : folder r)= - fold [fn r :: {Unit} => $(mapUT tf r) -> tr r] + fold [fn r :: {Unit} => $(mapU tf r) -> tr r] (fn (nm :: Name) (t :: Unit) (rest :: {Unit}) acc [[nm] ~ rest] r => f [nm] [rest] ! r.nm (acc (r -- nm))) @@ -86,7 +86,7 @@ fun foldUR2 (tf1 :: Type) (tf2 :: Type) (tr :: {Unit} -> Type) -> [[nm] ~ rest] => tf1 -> tf2 -> tr rest -> tr ([nm] ++ rest)) (i : tr []) (r :: {Unit}) (fold : folder r) = - fold [fn r :: {Unit} => $(mapUT tf1 r) -> $(mapUT tf2 r) -> tr r] + fold [fn r :: {Unit} => $(mapU tf1 r) -> $(mapU tf2 r) -> tr r] (fn (nm :: Name) (t :: Unit) (rest :: {Unit}) acc [[nm] ~ rest] r1 r2 => f [nm] [rest] ! r1.nm r2.nm (acc (r1 -- nm) (r2 -- nm))) diff --git a/lib/ur/top.urs b/lib/ur/top.urs index 583b025f..bb85abd0 100644 --- a/lib/ur/top.urs +++ b/lib/ur/top.urs @@ -29,7 +29,7 @@ con fst3 = K1 ==> K2 ==> K3 ==> fn t :: (K1 * K2 * K3) => t.1 con snd3 = K1 ==> K2 ==> K3 ==> fn t :: (K1 * K2 * K3) => t.2 con thd3 = K1 ==> K2 ==> K3 ==> fn t :: (K1 * K2 * K3) => t.3 -con mapUT = fn f :: Type => map (fn _ :: Unit => f) +con mapU = K ==> fn f :: K => map (fn _ :: Unit => f) con ex = fn tf :: (Type -> Type) => res ::: Type -> (choice :: Type -> tf choice -> res) -> res @@ -46,19 +46,19 @@ val foldUR : tf :: Type -> tr :: ({Unit} -> Type) -> (nm :: Name -> rest :: {Unit} -> [[nm] ~ rest] => tf -> tr rest -> tr ([nm] ++ rest)) - -> tr [] -> r :: {Unit} -> folder r -> $(mapUT tf r) -> tr r + -> tr [] -> r :: {Unit} -> folder r -> $(mapU tf r) -> tr r val foldUR2 : tf1 :: Type -> tf2 :: Type -> tr :: ({Unit} -> Type) -> (nm :: Name -> rest :: {Unit} -> [[nm] ~ rest] => tf1 -> tf2 -> tr rest -> tr ([nm] ++ rest)) - -> tr [] -> r :: {Unit} -> folder r -> $(mapUT tf1 r) -> $(mapUT tf2 r) -> tr r + -> tr [] -> r :: {Unit} -> folder r -> $(mapU tf1 r) -> $(mapU tf2 r) -> tr r val foldURX2: tf1 :: Type -> tf2 :: Type -> ctx :: {Unit} -> (nm :: Name -> rest :: {Unit} -> [[nm] ~ rest] => tf1 -> tf2 -> xml ctx [] []) - -> r :: {Unit} -> folder r -> $(mapUT tf1 r) -> $(mapUT tf2 r) -> xml ctx [] [] + -> r :: {Unit} -> folder r -> $(mapU tf1 r) -> $(mapU tf2 r) -> xml ctx [] [] val foldR : K --> tf :: (K -> Type) -> tr :: ({K} -> Type) -> (nm :: Name -> t :: K -> rest :: {K} |