Commit 202712d3 authored by Jan Rochel's avatar Jan Rochel
Browse files

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
parent 99bab7d8
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment