comparison src/ur/feed.urs @ 3:ea0ca570c121

Shortcut tag combinators
author Adam Chlipala <adam@chlipala.net>
date Tue, 11 Jan 2011 14:19:51 -0500
parents 8de269c09617
children af95d9d73eb5
comparison
equal deleted inserted replaced
2:2ec84d349838 3:ea0ca570c121
2 2
3 con tagInternal :: {Unit} -> Type 3 con tagInternal :: {Unit} -> Type
4 4
5 val tag : attrs ::: {Unit} -> folder attrs -> string -> $(mapU string attrs) 5 val tag : attrs ::: {Unit} -> folder attrs -> string -> $(mapU string attrs)
6 -> pattern (tagInternal attrs) {Attrs : $(mapU string attrs), Cdata : option string} 6 -> pattern (tagInternal attrs) {Attrs : $(mapU string attrs), Cdata : option string}
7
8 val tagA : attrs ::: {Unit} -> folder attrs -> string -> $(mapU string attrs)
9 -> pattern (tagInternal attrs) $(mapU string attrs)
10 val tagC : string -> pattern (tagInternal []) string
7 11
8 con childrenInternal :: Type -> {Type} -> Type 12 con childrenInternal :: Type -> {Type} -> Type
9 13
10 val children : parentI ::: Type -> parent ::: Type -> children ::: {(Type * Type)} 14 val children : parentI ::: Type -> parent ::: Type -> children ::: {(Type * Type)}
11 -> pattern parentI parent -> $(map (fn (i, d) => pattern i d) children) -> folder children 15 -> pattern parentI parent -> $(map (fn (i, d) => pattern i d) children) -> folder children