diff options
author | Benjamin Barenblat <bbaren@mit.edu> | 2013-04-30 13:38:02 -0400 |
---|---|---|
committer | Benjamin Barenblat <bbaren@mit.edu> | 2013-04-30 13:38:02 -0400 |
commit | b2dc3a9199369af04cf3ee9db0d1ebb5576a594b (patch) | |
tree | 538dc6f0a54cd47dfcab54adfb337608ad374382 /forum/author.ur | |
parent | 63fc8aaf40dfd70129a8d8ae1eed71b43c889591 (diff) |
Forum: Rename “asker” to “author”
Diffstat (limited to 'forum/author.ur')
-rw-r--r-- | forum/author.ur | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/forum/author.ur b/forum/author.ur new file mode 100644 index 0000000..e0b1989 --- /dev/null +++ b/forum/author.ur @@ -0,0 +1,26 @@ +type author = option string + +val eq_author = Option.eq + +val show_author = + mkShow ( + fn nameOpt => + case nameOpt of + None => "Anonymous" + | Some nam => nam + ) + +val read_author = + let fun parse text = + case text of + "Anonymous" => None + | nam => Some nam + in + mkRead parse (compose Some parse) + end + +val sql_author = sql_option_prim + +val anonymous = None + +val namedAuthor = Some |