diff options
author | Benjamin Barenblat <bbaren@mit.edu> | 2013-04-21 15:58:34 -0400 |
---|---|---|
committer | Benjamin Barenblat <bbaren@mit.edu> | 2013-04-21 15:58:34 -0400 |
commit | 7d189e95615b37106d504415ce21b8eec8710080 (patch) | |
tree | 8a555962766babe4325305ced0620cc5ddf2e786 /forum | |
parent | e65f4fa2ebe4ded5f15f59e729736879874e34a4 (diff) |
Forum: Functorize entry point
Diffstat (limited to 'forum')
-rw-r--r-- | forum/forum.ur | 24 | ||||
-rw-r--r-- | forum/forum.urs | 8 |
2 files changed, 23 insertions, 9 deletions
diff --git a/forum/forum.ur b/forum/forum.ur index f680ec4..8cb11da 100644 --- a/forum/forum.ur +++ b/forum/forum.ur @@ -16,13 +16,21 @@ details. You should have received a copy of the GNU Affero General Public License along with 6.947. If not, see <http://www.gnu.org/licenses/>. *) +functor Make(Template : sig + val generic : option string -> xbody -> page +end) = struct + open Styles -fun main () : xbody = - <xml> - <div class={content}> - <p> - Coming soon! - </p> - </div> - </xml> +fun main () : transaction page = + return ( + Template.generic (Some "Forum") <xml> + <div class={content}> + <p> + Coming soon! + </p> + </div> + </xml> + ) + +end diff --git a/forum/forum.urs b/forum/forum.urs index 1dad9a7..bf25c4f 100644 --- a/forum/forum.urs +++ b/forum/forum.urs @@ -16,4 +16,10 @@ details. You should have received a copy of the GNU Affero General Public License along with 6.947. If not, see <http://www.gnu.org/licenses/>. *) -val main : unit -> xbody +functor Make(Template : sig + val generic : option string -> xbody -> page +end) : sig + +val main : unit -> transaction page + +end |