Re: [GHC] #2428: bad error message for multiple modules in the same file

2010-06-24 Thread GHC
#2428: bad error message for multiple modules in the same file
---+
  Reporter:  Isaac Dupree  |  Owner:  
  Type:  bug   | Status:  closed  
  Priority:  low   |  Milestone:  6.14.1  
 Component:  Compiler  |Version:  6.8.2   
Resolution:  wontfix   |   Keywords:  
Difficulty:  Unknown   | Os:  Unknown/Multiple
  Testcase:|   Architecture:  Unknown/Multiple
   Failure:  None/Unknown  |  
---+
Changes (by igloo):

  * status:  new = closed
  * failure:  = None/Unknown
  * resolution:  = wontfix


Comment:

 It's tricky to fix the
 {{{
 Could not find module `MyMod':
 }}}
 error, as GHC is deliberately not parsing the entire module for efficiency
 reasons.

 As this ticket hasn't gathered any other supporters in 2 years, I think
 I'll just mark it wontfix.

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2428#comment:7
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


Re: [GHC] #2428: bad error message for multiple modules in the same file

2009-04-13 Thread GHC
#2428: bad error message for multiple modules in the same file
-+--
Reporter:  Isaac Dupree  |Owner:  
Type:  bug   |   Status:  new 
Priority:  normal|Milestone:  6.12 branch 
   Component:  Compiler  |  Version:  6.8.2   
Severity:  normal|   Resolution:  
Keywords:|   Difficulty:  Unknown 
Testcase:|   Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |  
-+--
Changes (by igloo):

  * milestone:  6.10 branch = 6.12 branch

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2428#comment:4
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


[GHC] #2428: bad error message for multiple modules in the same file

2008-07-07 Thread GHC
#2428: bad error message for multiple modules in the same file
-+--
Reporter:  Isaac Dupree  |   Owner:  
Type:  bug   |  Status:  new 
Priority:  normal|   Component:  Compiler
 Version:  6.8.2 |Severity:  normal  
Keywords:|Testcase:  
Architecture:  Unknown   |  Os:  Unknown 
-+--
 consider this file:
 {{{
 module MyMod where
 foo :: Int
 foo = 3

 module Main (main) where
 import MyMod (foo)
 main :: IO ()
 main = print foo
 }}}

 The layout rule dictates that this parses properly (the first module
 clause ends when the second module gives a parse error, just like in
 ends a let); this gets the same error:
 {{{
 module MyMod where
  { foo :: Int; foo = 3 }
 module Main (main) where
  { import MyMod (foo); main :: IO (); main = print foo }
 }}}

 The Haskell98 report doesn't say anything about how modules are expected
 to be laid out in files, so I had assumed it would work.  The error is
 {{{
 parse error on input `module'
 }}}
 (except if Main comes before `MyMod`, ''and'' --make is used with ghc, we
 get
 {{{
 Could not find module `MyMod':
 Use -v to see a list of the files searched for.
 }}}
 even though `MyMod` is clearly (to a human) in that very file.)

 It took me a long time to figure out what was wrong and what I had to do.
 Admittedly I'm only slightly interested in GHC implementing support to
 allow this, since if multiple files are involved at all it causes module-
 finding trouble (obviously to me now); mostly I just want a good error
 message, maybe something like Each file must contain exactly one module.
 Any module intended to be imported must be in an appropriately named file,
 e.g. module `Module.Name' goes in `Module/Name.hs'.

 ( This happened to me a long time ago... but I was reminded by #2427 )

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2428
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