From 3f439080c47d49318fd814b74a128897f9fdac59 Mon Sep 17 00:00:00 2001 From: Benjamin Barenblat Date: Sat, 2 Mar 2013 20:19:28 -0500 Subject: Templateize a bit better --- main.ur | 86 ++++++++++++++++++++++++++++------------------------------------- 1 file changed, 37 insertions(+), 49 deletions(-) diff --git a/main.ur b/main.ur index 491d9b6..76082f9 100644 --- a/main.ur +++ b/main.ur @@ -57,46 +57,9 @@ fun menu (current : pageName) : xbody = end -(*********************************** Pages ***********************************) -(* These need to be mutually recursive with the menu code--otherwise, the menus -can't link to all the pages. *) - -and main () = - return - {headTag None} - -

6.947 – Functional Programming Project Laboratory

- {menu (make [#Main] ())} -
-

- Like 6.115, 6.947 is a chance to remember why you came to mit: to learn and to build. - Whereas 6.115 focuses on constructing digital systems from compositions of discrete integrated circuits, however, we’ll be focusing on functional programming – constructing software systems from compositions of discrete mathematical functions. - Prepare to leave behind everything you've ever known about programming and enter a world of functors, combinators, and monads; a world without borders or boundaries; a world where anything is possible. -

-
- {licenseInfo ()} - -
+(********************************* Template **********************************) -and forum () = - return - {headTag (Some "Forum")} - -

6.947 – Functional Programming Project Laboratory

- {menu (make [#Forum] ())} -
-

- Coming soon! -

-
- {licenseInfo ()} - -
- - -(****************************** Page components ******************************) - -and headTag (pageName : option string) : xhtml [] [] = +and generic (pageName : option string) (menuAndContent : xbody) : xhtml [] [] = let val titleString : string = case pageName of | None => "6.947 – Functional Programming Project Laboratory" @@ -107,23 +70,48 @@ and headTag (pageName : option string) : xhtml [] [] = {[titleString]} + +

6.947 – Functional Programming Project Laboratory

+ {menuAndContent} +
+

+ 6.947 is free software: you can redistribute it and/or modify it under the terms of the gnu Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +

+ +

+ 6.947 is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. + See the gnu Affero General Public License for more details. +

+ +

+ You can get the 6.947 source code via AFS. +

+
+ end -and licenseInfo () : xbody = - -
-

- 6.947 is free software: you can redistribute it and/or modify it under the terms of the gnu Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -

+(*********************************** Pages ***********************************) + +and main () = + return (generic None + {menu (make [#Main] ())} +

- 6.947 is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. - See the gnu Affero General Public License for more details. + Like 6.115, 6.947 is a chance to remember why you came to mit: to learn and to build. + Whereas 6.115 focuses on constructing digital systems from compositions of discrete integrated circuits, however, we’ll be focusing on functional programming – constructing software systems from compositions of discrete mathematical functions. + Prepare to leave behind everything you've ever known about programming and enter a world of functors, combinators, and monads; a world without borders or boundaries; a world where anything is possible.

+
+
) +and forum () = + return (generic (Some "Forum") + {menu (make [#Forum] ())} +

- You can get the 6.947 source code via AFS. + Coming soon!

-
+ ) -- cgit v1.2.3