[GHC] #8959: GHCi should honour UnicodeSyntax
GHC
ghc-devs at haskell.org
Sat Jun 7 10:08:08 UTC 2014
#8959: GHCi should honour UnicodeSyntax
-------------------------------+-------------------------------------------
Reporter: Fuuzetsu | Owner:
Type: bug | Status: closed
Priority: low | Milestone: 7.10.1
Component: Compiler | Version: 7.6.3
Resolution: fixed | Keywords:
Operating System: | Architecture: Unknown/Multiple
Unknown/Multiple | Difficulty: Easy (less than 1 hour)
Type of failure: | Blocked By:
None/Unknown | Related Tickets:
Test Case: |
Blocking: |
-------------------------------+-------------------------------------------
Comment (by nomeata):
Sigh: #3217 is not all there is to fix.
Independent of GHCi we seem to want error messages from modules with
`UnicodeSyntax` printed with that syntax. So we need to instrument `SDoc`
in error messages with the settings from where the setting originated.
The `dynflags` passed in `SDocContext` does not work for this, as they are
the dynflags in scope when the error is printed, i.e. outside the module
scope.
There is precedence: The `PrintUnqualified` field of `ErrMsg` and later of
`PprUser` transports information about how to pretty print stuff from the
location of error to when its `SDoc` is rendered. I added a `Bool` there
to indicate whether `UnicodeSyntax` should be used and it seems to work,
but I’m not satisfied with this design.
Stored the change in the `wip/T8959` branch, see
[changeset:4a4e684f4/ghc].
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8959#comment:11>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list