Mercurial > feed
diff 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 |
line wrap: on
line diff
--- a/src/ur/feed.urs Sun Jul 24 03:36:07 2011 -0430 +++ b/src/ur/feed.urs Mon Jul 25 20:55:09 2011 -0430 @@ -71,6 +71,14 @@ * be matched at any depth within the parent's subtree. Unlike [children], * [tree] finds as many subtree matches per parent node as possible. *) +con gatherInternal :: Type -> Type -> Type -> Type + +val gather : parentI ::: Type -> parent ::: Type -> childI ::: Type -> child ::: Type + -> pattern parentI parent -> pattern childI child + -> pattern (gatherInternal parentI childI child) (parent * list child) +(* A combinator like tree that collects matching subtree patterns into a list rather + * than handling them one at a time. *) + type document val show_document : show document (* Type of uninterpreted XML documents *)