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
import Pretty
import ExternalCore
import Char
+import Encoding ( zEncodeString )
instance Show Module where
showsPrec d m = shows (pmodule m)
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)))
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