annotate src/ur/feed.urs @ 7:05a28a77f6fe

'show' instance for 'document'
author Adam Chlipala <adam@chlipala.net>
date Thu, 10 Mar 2011 18:36:50 -0500
parents e0bae488825c
children a4e5d053daed
rev   line source
adam@1 1 con pattern :: Type -> Type -> Type
adam@1 2
adam@1 3 con tagInternal :: {Unit} -> Type
adam@1 4
adam@4 5 val null : pattern unit (variant [])
adam@4 6
adam@1 7 val tag : attrs ::: {Unit} -> folder attrs -> string -> $(mapU string attrs)
adam@1 8 -> pattern (tagInternal attrs) {Attrs : $(mapU string attrs), Cdata : option string}
adam@1 9
adam@3 10 val tagA : attrs ::: {Unit} -> folder attrs -> string -> $(mapU string attrs)
adam@3 11 -> pattern (tagInternal attrs) $(mapU string attrs)
adam@6 12 val tagAO : attrs ::: {Unit} -> folder attrs -> string -> $(mapU string attrs)
adam@6 13 -> pattern (tagInternal attrs) $(mapU (option string) attrs)
adam@6 14
adam@3 15 val tagC : string -> pattern (tagInternal []) string
adam@3 16
adam@1 17 con childrenInternal :: Type -> {Type} -> Type
adam@1 18
adam@1 19 val children : parentI ::: Type -> parent ::: Type -> children ::: {(Type * Type)}
adam@1 20 -> pattern parentI parent -> $(map (fn (i, d) => pattern i d) children) -> folder children
adam@1 21 -> pattern (childrenInternal parentI (map fst children)) (parent * $(map snd children))
adam@6 22 val childrenO : parentI ::: Type -> parent ::: Type -> children ::: {(Type * Type)}
adam@6 23 -> pattern parentI parent -> $(map (fn (i, d) => pattern i d) children) -> folder children
adam@6 24 -> pattern (childrenInternal parentI (map fst children)) (parent * $(map (fn (i, d) => option d) children))
adam@1 25
adam@4 26 con treeInternal :: Type -> Type -> Type
adam@4 27
adam@4 28 val tree : parentI ::: Type -> parent ::: Type -> childI ::: Type -> child ::: Type
adam@4 29 -> pattern parentI parent -> pattern childI child
adam@4 30 -> pattern (treeInternal parentI childI) (parent * child)
adam@4 31
adam@5 32 type document
adam@7 33 val show_document : show document
adam@5 34
adam@5 35 val fetch : string (* url *) -> transaction document
adam@5 36 val app : internal ::: Type -> data ::: Type -> pattern internal data -> (data -> transaction {}) -> document -> transaction {}