tuned -- prefer GHC.print_codepoint;
authorwenzelm
Tue Oct 30 19:25:32 2018 +0100 (6 months ago)
changeset 6921092fde8f61b0d
parent 69209 3f4210c13356
child 69211 7062639cfdaa
tuned -- prefer GHC.print_codepoint;
src/Tools/Code/code_haskell.ML
     1.1 --- a/src/Tools/Code/code_haskell.ML	Tue Oct 30 19:18:01 2018 +0100
     1.2 +++ b/src/Tools/Code/code_haskell.ML	Tue Oct 30 19:25:32 2018 +0100
     1.3 @@ -36,14 +36,9 @@
     1.4  (** Haskell serializer **)
     1.5  
     1.6  val print_haskell_string =
     1.7 -  let
     1.8 -    fun char c =
     1.9 -      let
    1.10 -        val _ = if Symbol.is_ascii c then ()
    1.11 -          else error "non-ASCII byte in Haskell string literal";
    1.12 -        val s = ML_Syntax.print_symbol_char c;
    1.13 -      in if s = "'" then "\\'" else s end;
    1.14 -  in quote o translate_string char end;
    1.15 +  quote o translate_string (fn c =>
    1.16 +    if Symbol.is_ascii c then GHC.print_codepoint (ord c)
    1.17 +    else error "non-ASCII byte in Haskell string literal");
    1.18  
    1.19  fun print_haskell_stmt class_syntax tyco_syntax const_syntax
    1.20      reserved deresolve deriving_show =