diff --git a/src/Compiler/Lambda/LambdaExp.sml b/src/Compiler/Lambda/LambdaExp.sml index 173dcbab..439f05d1 100644 --- a/src/Compiler/Lambda/LambdaExp.sml +++ b/src/Compiler/Lambda/LambdaExp.sml @@ -1017,7 +1017,7 @@ structure LambdaExp : LAMBDA_EXP = | SWITCH_W {switch, precision, tyname} => layoutSwitch layoutLambdaExp (fn w => "0x" ^ IntInf.fmt StringCvt.HEX w) switch | SWITCH_S sw => - layoutSwitch layoutLambdaExp (fn x => x) sw + layoutSwitch layoutLambdaExp (fn x => "\"" ^ String.toString x ^ "\"") sw | SWITCH_C sw => let fun unwildify (sw as SWITCH(lamb as VAR{lvar,...},rules,SOME e)) = (case e of diff --git a/test/barry/string.out.ok b/test/barry/string.out.ok index b52d0d17..a0e9eb6e 100644 --- a/test/barry/string.out.ok +++ b/test/barry/string.out.ok @@ -39,3 +39,4 @@ test22 OK test23 OK test24 OK test25 OK +test26 OK diff --git a/test/barry/string.sml b/test/barry/string.sml index 5169939a..ad01035b 100644 --- a/test/barry/string.sml +++ b/test/barry/string.sml @@ -371,4 +371,11 @@ val test25 = andalso not (isPrefix "Abcde" "abcde") andalso not (isPrefix "abcdE" "abcde")) +val test26 = + tst' "test26" (fn _ => + case "foo" of + "bar" => false + | "baz" => false + | "foo" => true + | _ => false) end