From 92baa4f6bf99efe229abf2ab895cec8fd7a8936d Mon Sep 17 00:00:00 2001 From: Rose Hogenson Date: Fri, 17 May 2024 16:16:49 -0700 Subject: Fix case on datatype. --- syntax.sml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'syntax.sml') diff --git a/syntax.sml b/syntax.sml index 767851d..aa94b09 100644 --- a/syntax.sml +++ b/syntax.sml @@ -57,7 +57,7 @@ struct | LRecord of lexp list | LSelect of int * lexp | LPrim of primop - | LSwitch of lexp * (int * lexp) list * lexp + | LSwitch of lexp * (int * lexp) list * lexp option (* CPS *) datatype value = @@ -173,7 +173,7 @@ struct | LRecord l => "LRecord " ^ listToString lexpToString l | LSelect (i, r) => "LSelect (" ^ Int.toString i ^ ", " ^ lexpToString r ^ ")" | LPrim p => "LPrim " ^ primopToString p - | LSwitch (e, arms, otherwise) => "LSwitch (" ^ lexpToString e ^ ", " ^ listToString (fn (x, e) => "(" ^ Int.toString x ^ ", " ^ lexpToString e ^ ")") arms ^ ", " ^ lexpToString otherwise ^ ")" + | LSwitch (e, arms, otherwise) => "LSwitch (" ^ lexpToString e ^ ", " ^ listToString (fn (x, e) => "(" ^ Int.toString x ^ ", " ^ lexpToString e ^ ")") arms ^ ", " ^ optionToString lexpToString otherwise ^ ")" fun valueToString (x : value) : string = case x of -- cgit v1.3.1