Mercurial > feed
comparison src/ur/feed.urs @ 14:f641cfcd5153
Add gather pattern.
author | Karn Kallio <kkallio@eka> |
---|---|
date | Mon, 25 Jul 2011 20:55:09 -0430 |
parents | 43c3fbd8527a |
children | 7275f59cab61 |
comparison
equal
deleted
inserted
replaced
13:7eea7ff1904c | 14:f641cfcd5153 |
---|---|
69 -> pattern (treeInternal parentI childI) (parent * child) | 69 -> pattern (treeInternal parentI childI) (parent * child) |
70 (* A combinator that takes in a pattern for a parent node and another pattern to | 70 (* A combinator that takes in a pattern for a parent node and another pattern to |
71 * be matched at any depth within the parent's subtree. Unlike [children], | 71 * be matched at any depth within the parent's subtree. Unlike [children], |
72 * [tree] finds as many subtree matches per parent node as possible. *) | 72 * [tree] finds as many subtree matches per parent node as possible. *) |
73 | 73 |
74 con gatherInternal :: Type -> Type -> Type -> Type | |
75 | |
76 val gather : parentI ::: Type -> parent ::: Type -> childI ::: Type -> child ::: Type | |
77 -> pattern parentI parent -> pattern childI child | |
78 -> pattern (gatherInternal parentI childI child) (parent * list child) | |
79 (* A combinator like tree that collects matching subtree patterns into a list rather | |
80 * than handling them one at a time. *) | |
81 | |
74 type document | 82 type document |
75 val show_document : show document | 83 val show_document : show document |
76 (* Type of uninterpreted XML documents *) | 84 (* Type of uninterpreted XML documents *) |
77 | 85 |
78 val fetch : string -> transaction document | 86 val fetch : string -> transaction document |