#2147: unhelpful error message for a misplaced DEPRECATED pragma
----------------------+-----------------------------------------------------
 Reporter:  guest     |          Owner:         
     Type:  bug       |         Status:  new    
 Priority:  normal    |      Milestone:  6.10.1 
Component:  Compiler  |        Version:  6.8.2  
 Severity:  minor     |     Resolution:         
 Keywords:            |     Difficulty:  Unknown
 Testcase:            |   Architecture:  Unknown
       Os:  Unknown   |  
----------------------+-----------------------------------------------------
Comment (by igloo):

 In the HEAD/6.10 we get:
 {{{
 Foo/Bar.hs:1:0:
     File name does not match module name:
     Saw: `Main'
     Expected: `Foo.Bar'
 }}}

 The problem is that when we go to compile Foo.Bar we first want to get its
 imports, so that we know what else we have to compile first. When we hit
 the pragma, we think that the module body has started, and do not parse
 any more, so as far as GHC is concerned this is a module that has no
 header, and thus defaults to module Main. I'm not sure how we can do
 better. Perhaps returning the source location at which we decide what the
 module name is would help?

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2147#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to