Possible unpackFS problem

Alan & Kim Zimmerman alan.zimm at gmail.com
Sat Jan 10 15:39:03 UTC 2015


While doing further round-trip testing, I cam across the following issue

Original source

    module Deprecation
    {-# Deprecated ["This is a module \"deprecation\"",
                 "multi-line"] #-}
       ( foo )
     where

Pretty-printed AST via ppr

   (L {examples/Deprecation.hs:(3,1)-(4,30)}
    (DeprecatedTxt
     (L {examples/Deprecation.hs:3:1-14} "{-# Deprecated")
     [
      (L {examples/Deprecation.hs:3:17-50} {FastString: "This is a module
\"deprecation\""}),
      (L {examples/Deprecation.hs:4:14-25} {FastString: "multi-line"})])))

output where the FastString is converted to a string via unpackFS

    module Deprecation
    {-# Deprecated ["This is a module "deprecation"",
                 "multi-line"] #-}
       ( foo )
     where

So, the ppr (via Pretty.ftext) is able to reproduce the escape characters
in original string, but unpackFS does not.

Is this a problem for anyone else?

Regards
  Aan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20150110/9a41a152/attachment.html>


More information about the ghc-devs mailing list