From e578da5c4f19af7446a48a9d78f45de51383d4ac Mon Sep 17 00:00:00 2001 From: Benjamin Barenblat Date: Thu, 2 May 2013 21:21:22 -0400 Subject: Forum: Add upvote button --- forum/author.ur | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'forum/author.ur') diff --git a/forum/author.ur b/forum/author.ur index f58d4cf..5cbc136 100644 --- a/forum/author.ur +++ b/forum/author.ur @@ -57,8 +57,22 @@ val sql_username = sql_prim fun name uOrA = uOrA +val nameError = MyOption.getError + val orAnonymous = Some +(* I can't express this in terms of whenIdentified'--I get a "substitution in +constructor is blocked by a too-deep unification variable." *) +fun whenIdentified [ctx] [use] uOrA text = + case uOrA of + None => + | Some u => text + +fun whenIdentified' [ctx] [use] uOrA generator = + case uOrA of + None => + | Some u => generator u + fun toOptionTag [_use] uOrA = case uOrA of None => -- cgit v1.2.3