diff options
Diffstat (limited to 'forum/author.urs')
-rw-r--r-- | forum/author.urs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/forum/author.urs b/forum/author.urs index 1f394f0..db6e7a8 100644 --- a/forum/author.urs +++ b/forum/author.urs @@ -43,9 +43,17 @@ val sql_username : sql_injectable username (******************************** Converting *********************************) val name : usernameOrAnonymous -> option username +val nameError : usernameOrAnonymous -> username val orAnonymous : username -> usernameOrAnonymous +val whenIdentified : ctx ::: {Unit} -> use ::: {Type} -> + usernameOrAnonymous -> xml ctx use [] -> xml ctx use [] + +val whenIdentified' : ctx ::: {Unit} -> use ::: {Type} -> + usernameOrAnonymous -> (username -> xml ctx use []) + -> xml ctx use [] + (* Converts a 'usernameOrAnonymous' to an 'option' tag. If anonymous, produces empty XML. *) val toOptionTag : use ::: {Type} -> usernameOrAnonymous -> xml select use [] |