#2911: Error messages have the wrong qualified names
---------------------------------+------------------------------------------
Reporter: igloo | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.11
Severity: minor | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Os: Unknown/Multiple
Architecture: Unknown/Multiple |
---------------------------------+------------------------------------------
Comment (by simonpj):
This is a tricky one to fix. In both cases, the error message reports a
''valid'' way of referring to `empty`, just not the way that it was
written in the source program.
The trouble is that the renamer has replaced the `RdrName` (which is more
or less just a string) "BS.empty" by the `Name`
`Data.ByteString.Lazy.empty`, which uniquely identifies the thing referred
to (regardless of the string used to name it in the source program). That
is, the renamer converts `HsExpr RdrName` to `HsExpr Name`. So the type
checker doesn't even know exactly how you originally referred to it.
It'd be possible to retain the original text in the syntax tree, and
perhaps better to do so. That is, make the renamer convert `HsExpr
RdrName` to `HsExpr (RdrName,Name)`. This'd add a bit of code, and slow
down every compilation, so I'm not convinced it's worth it. Let's see
what others think.
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2911#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs