[GHC] #8956: Confusing error message due to ` #`-lines

#8956: Confusing error message due to ` #`-lines -------------------------+------------------------------------------------- Reporter: hvr | Owner: Type: bug | Status: new Priority: | Milestone: normal | Version: 7.8.1-rc2 Component: | Operating System: Unknown/Multiple Compiler | Type of failure: Incorrect warning at Keywords: | compile-time Architecture: | Test Case: Unknown/Multiple | Blocking: Difficulty: | Unknown | Blocked By: | Related Tickets: | -------------------------+------------------------------------------------- Consider the following two (invalid) modules `M1` and `M2`: {{{#!hs # 1 "<built-in>" 1 module M1 where }}} and {{{#!hs # 1 "<built-in>" 1 module M2 where }}} When those are compiled separately by GHC, they result in the following error: {{{ $ ghc -c -Wall M1.hs M1.hs:1:2: parse error on input ‘#’ ghc -c -Wall M2.hs M2.hs:1:2: parse error on input ‘#’ }}} However, when compiled simultaneously, the modules get seemingly parsed as `Main`-modules (which then conflict with each others): {{{ ghc --make -Wall M1.hs M2.hs <no location info>: module ‘main:Main’ is defined in multiple files: M1.hs M2.hs }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8956 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8956: Confusing error message due to ` #`-lines -------------------------------------------------+------------------------- Reporter: hvr | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: Resolution: | 7.8.1-rc2 Operating System: Unknown/Multiple | Keywords: Type of failure: Incorrect warning at | Architecture: compile-time | Unknown/Multiple Test Case: | Difficulty: Blocking: | Unknown | Blocked By: | Related Tickets: -------------------------------------------------+------------------------- Comment (by hvr): Here's another example: {{{#!hs f = () module M3 where }}} {{{#!hs f = () module M4 where }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8956#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8956: Parser error shadowed by "module ‘main:Main’ is defined in multiple files" error -------------------------------------------------+------------------------- Reporter: hvr | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: Resolution: | 7.8.1-rc2 Operating System: Unknown/Multiple | Keywords: Type of failure: Incorrect warning at | Architecture: compile-time | Unknown/Multiple Test Case: | Difficulty: Blocking: | Unknown | Blocked By: | Related Tickets: -------------------------------------------------+------------------------- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8956#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC