diff options
author | Benjamin Barenblat <bbaren@mit.edu> | 2013-05-02 21:21:22 -0400 |
---|---|---|
committer | Benjamin Barenblat <bbaren@mit.edu> | 2013-05-02 21:21:22 -0400 |
commit | e578da5c4f19af7446a48a9d78f45de51383d4ac (patch) | |
tree | 5d2b106748fda2c031d2400fc5ce81c2fb69405a /forum/author.ur | |
parent | 53a2c4d4a18c2f5903961bce7bc61cf19336157f (diff) |
Forum: Add upvote button
Diffstat (limited to 'forum/author.ur')
-rw-r--r-- | forum/author.ur | 14 |
1 files changed, 14 insertions, 0 deletions
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 => <xml/> + | Some u => text + +fun whenIdentified' [ctx] [use] uOrA generator = + case uOrA of + None => <xml/> + | Some u => generator u + fun toOptionTag [_use] uOrA = case uOrA of None => <xml/> |