From 202712d39046f01f024dc0f637626bc2cd87fd80 Mon Sep 17 00:00:00 2001 From: Jan Rochel Date: Sun, 2 Jul 2006 21:44:38 +0000 Subject: [PATCH] Z-Encode external-core output HEAD doesn't z-encode external-core output (unlike 6.4). I suppose, that this is unwanted behaviour. It probably results from this patch: ======================================================================== Fri Jan 6 17:30:19 CET 2006 simonmar * [project @ 2006-01-06 16:30:17 by simonmar] Add support for UTF-8 source files [...] Z-encoding has been moved right to the back end. Previously we used to Z-encode every identifier on the way in for simplicity, and only decode when we needed to show something to the user. Instead, we now keep every string in its UTF-8 encoding, and Z-encode right before printing it out. [...] ======================================================================== Greetings Jan --- compiler/coreSyn/PprExternalCore.lhs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/compiler/coreSyn/PprExternalCore.lhs b/compiler/coreSyn/PprExternalCore.lhs index 29451d0..1d4e954 100644 --- a/compiler/coreSyn/PprExternalCore.lhs +++ b/compiler/coreSyn/PprExternalCore.lhs @@ -8,6 +8,7 @@ module PprExternalCore () where import Pretty import ExternalCore import Char +import Encoding ( zEncodeString ) instance Show Module where showsPrec d m = shows (pmodule m) @@ -40,7 +41,7 @@ instance Show Lit where indent = nest 2 pmodule (Module mname tdefs vdefgs) = - (text "%module" <+> text mname) + (text "%module" <+> text (zEncodeString mname)) $$ indent ((vcat (map ((<> char ';') . ptdef) tdefs)) $$ (vcat (map ((<> char ';') . pvdefg) vdefgs))) @@ -59,7 +60,7 @@ pcdef (Constr dcon tbinds tys) = pcdef (GadtConstr dcon ty) = (pname dcon) <+> text "::" <+> pty ty -pname id = text id +pname id = text (zEncodeString id) pqname ("",id) = pname id pqname (m,id) = pname m <> char '.' <> pname id -- 1.7.10.4