summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2010-02-28 15:46:41 -0500
committerGravatar Adam Chlipala <adamc@hcoop.net>2010-02-28 15:46:41 -0500
commitddc694f14352fa69557be02913fe9c3daeec13b0 (patch)
tree4aeca801868850579ec9ac59cefcf4a5ed6bf25f /lib
parent703c91af7525838dff97f88245bf7482745e771e (diff)
Fix parsing of space-free .urp directives; use 'class' for 'c*' tags
Diffstat (limited to 'lib')
-rw-r--r--lib/ur/top.ur18
-rw-r--r--lib/ur/top.urs13
2 files changed, 16 insertions, 15 deletions
diff --git a/lib/ur/top.ur b/lib/ur/top.ur
index 703c7bae..b6e4f6cf 100644
--- a/lib/ur/top.ur
+++ b/lib/ur/top.ur
@@ -138,15 +138,6 @@ fun foldUR2 [tf1 :: Type] [tf2 :: Type] [tr :: {Unit} -> Type]
f [nm] [rest] ! r1.nm r2.nm (acc (r1 -- nm) (r2 -- nm)))
(fn _ _ => i)
-fun foldURX2 [tf1 :: Type] [tf2 :: Type] [ctx :: {Unit}]
- (f : nm :: Name -> rest :: {Unit}
- -> [[nm] ~ rest] =>
- tf1 -> tf2 -> xml ctx [] []) =
- @@foldUR2 [tf1] [tf2] [fn _ => xml ctx [] []]
- (fn [nm :: Name] [rest :: {Unit}] [[nm] ~ rest] v1 v2 acc =>
- <xml>{f [nm] [rest] ! v1 v2}{acc}</xml>)
- <xml/>
-
fun foldR [K] [tf :: K -> Type] [tr :: {K} -> Type]
(f : nm :: Name -> t :: K -> rest :: {K}
-> [[nm] ~ rest] =>
@@ -195,6 +186,15 @@ fun mapX [K] [tf :: K -> Type] [ctx :: {Unit}]
<xml>{f [nm] [t] [rest] ! r}{acc}</xml>)
<xml/>
+fun mapUX2 [tf1 :: Type] [tf2 :: Type] [ctx :: {Unit}]
+ (f : nm :: Name -> rest :: {Unit}
+ -> [[nm] ~ rest] =>
+ tf1 -> tf2 -> xml ctx [] []) =
+ @@foldUR2 [tf1] [tf2] [fn _ => xml ctx [] []]
+ (fn [nm :: Name] [rest :: {Unit}] [[nm] ~ rest] v1 v2 acc =>
+ <xml>{f [nm] [rest] ! v1 v2}{acc}</xml>)
+ <xml/>
+
fun mapX2 [K] [tf1 :: K -> Type] [tf2 :: K -> Type] [ctx :: {Unit}]
(f : nm :: Name -> t :: K -> rest :: {K}
-> [[nm] ~ rest] =>
diff --git a/lib/ur/top.urs b/lib/ur/top.urs
index de2ac03b..83f24000 100644
--- a/lib/ur/top.urs
+++ b/lib/ur/top.urs
@@ -70,12 +70,6 @@ val foldUR2 : tf1 :: Type -> tf2 :: Type -> tr :: ({Unit} -> Type)
tf1 -> tf2 -> tr rest -> tr ([nm] ++ rest))
-> 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 -> $(mapU tf1 r) -> $(mapU tf2 r) -> xml ctx [] []
-
val foldR : K --> tf :: (K -> Type) -> tr :: ({K} -> Type)
-> (nm :: Name -> t :: K -> rest :: {K}
-> [[nm] ~ rest] =>
@@ -109,6 +103,13 @@ val mapX : K --> tf :: (K -> Type) -> ctx :: {Unit}
tf t -> xml ctx [] [])
-> r ::: {K} -> folder r -> $(map tf r) -> xml ctx [] []
+val mapUX2 : tf1 :: Type -> tf2 :: Type -> ctx :: {Unit}
+ -> (nm :: Name -> rest :: {Unit}
+ -> [[nm] ~ rest] =>
+ tf1 -> tf2 -> xml ctx [] [])
+ -> r ::: {Unit} -> folder r
+ -> $(mapU tf1 r) -> $(mapU tf2 r) -> xml ctx [] []
+
val mapX2 : K --> tf1 :: (K -> Type) -> tf2 :: (K -> Type) -> ctx :: {Unit}
-> (nm :: Name -> t :: K -> rest :: {K}
-> [[nm] ~ rest] =>