From 0643dd336bd6e23013b0d901d73127829ac469eb Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Mon, 3 Sep 2012 09:51:23 -0400 Subject: Update tutorial for Ur/Web changes --- doc/intro.ur | 4 ++-- src/c/static.c | 1 + src/tutorial.sml | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/intro.ur b/doc/intro.ur index e3611567..770b7b06 100644 --- a/doc/intro.ur +++ b/doc/intro.ur @@ -385,7 +385,7 @@ signature DOUBLE = sig 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 @@ signature OK_TYPE = sig 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 = () diff --git a/src/c/static.c b/src/c/static.c index cf1d0330..80ea5387 100644 --- a/src/c/static.c +++ b/src/c/static.c @@ -25,6 +25,7 @@ int main(int argc, char *argv[]) { ctx = uw_init(0, NULL, log_debug); uw_set_app(ctx, &uw_application); + uw_initialize(ctx); while (1) { fk = uw_begin(ctx, argv[1]); diff --git a/src/tutorial.sml b/src/tutorial.sml index 1b8834f5..dd2d3f7d 100644 --- a/src/tutorial.sml +++ b/src/tutorial.sml @@ -251,13 +251,13 @@ fun doUr fname = val s = readAll inf val _ = Unix.reap proc - val (befor, after) = Substring.position "" s + val (befor, after) = Substring.position "" 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 "" after in if Substring.isEmpty after then -- cgit v1.2.3