[GHC] #14343: bad pretty-printing of types with promoted data types
GHC
ghc-devs at haskell.org
Thu Oct 12 12:44:41 UTC 2017
#14343: bad pretty-printing of types with promoted data types
-------------------------------------+-------------------------------------
Reporter: lspitzner | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.2.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by lspitzner):
I am fine with '[' being lexed as it is, so i don't mind a wont-fix for
that aspect. But why does the error message for syntactically valid input
contain source fragments that are not syntactically valid?
Just as a test for how input is transformed (on 8.2.1 as well):
{{{
Prelude> _ :: Proxy '[ 'True ] -- 2 spaces in
input
<interactive>:8:1: error:
• Found hole: _ :: Proxy '['True] -- 0 spaces
• In the expression: _ :: Proxy '[ 'True] -- 1 spaces
In an equation for ‘it’: it = _ :: Proxy '[ 'True] -- 1 spaces
• Relevant bindings include
it :: Proxy '['True] (bound at <interactive>:8:1) -- 0 spaces
}}}
The zeros are problematic, and i think the ones only avoid the problem
because they don't really re-layout, they just merge whitespace (at least
that's what i suspect; haven't looked at the source).
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14343#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list