changeset 1814:2d9f831d45c9

Update tutorial for Ur/Web changes
author Adam Chlipala <adam@chlipala.net>
date Mon, 03 Sep 2012 09:51:23 -0400 (2012-09-03)
parents 4c61bb7acb9b
children 28986cfac833 e6ff36097cc4
files doc/intro.ur src/c/static.c src/tutorial.sml
diffstat 3 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/doc/intro.ur	Thu Aug 30 17:58:37 2012 +0400
+++ b/doc/intro.ur	Mon Sep 03 09:51:23 2012 -0400
@@ -385,7 +385,7 @@
 end
 
 structure Double : DOUBLE = struct
-    class double a = a -> a
+    con double a = a -> a
 
     fun double [a] (f : double a) (x : a) : a = f x
     fun mkDouble [a] (f : a -> a) : double a = f
@@ -420,7 +420,7 @@
 end
 
 structure OkType : OK_TYPE = struct
-    class ok a = unit
+    con ok a = unit
     fun importantOperation [a] (_ : ok a) (_ : a) = "You found an OK value!"
     val ok_int = ()
     val ok_float = ()
--- a/src/c/static.c	Thu Aug 30 17:58:37 2012 +0400
+++ b/src/c/static.c	Mon Sep 03 09:51:23 2012 -0400
@@ -25,6 +25,7 @@
  
   ctx = uw_init(0, NULL, log_debug);
   uw_set_app(ctx, &uw_application);
+  uw_initialize(ctx);
 
   while (1) {
     fk = uw_begin(ctx, argv[1]);
--- a/src/tutorial.sml	Thu Aug 30 17:58:37 2012 +0400
+++ b/src/tutorial.sml	Mon Sep 03 09:51:23 2012 -0400
@@ -251,13 +251,13 @@
                 val s = readAll inf
                 val _ = Unix.reap proc
 
-                val (befor, after) = Substring.position "<sc>" s
+                val (befor, after) = Substring.position "<body>" s
             in
                 if Substring.isEmpty after then
                     print ("Bad output for " ^ fname ^ "! [1]\n")
                 else
                     let
-                        val after = Substring.slice (after, 4, NONE)
+                        val after = Substring.slice (after, 6, NONE)
                         val (befor, after) = Substring.position "</body>" after
                     in
                         if Substring.isEmpty after then