Re: [GHC] #2147: unhelpful error message for a misplaced DEPRECATED pragma
#2147: unhelpful error message for a misplaced DEPRECATED pragma -+-- Reporter: guest |Owner: Type: bug | Status: new Priority: normal|Milestone: 6.12 branch Component: Compiler | Version: 6.8.2 Severity: minor | 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/2147#comment:8 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] #2147: unhelpful error message for a misplaced DEPRECATED pragma
#2147: unhelpful error message for a misplaced DEPRECATED pragma --+- Reporter: guest | Owner: Type: bug | Status: new Priority: normal| Milestone: 6.10 branch Component: Compiler |Version: 6.8.2 Severity: minor | Resolution: Keywords:| Difficulty: Unknown Testcase:| Architecture: Unknown/Multiple Os: Unknown/Multiple | --+- Changes (by igloo): * milestone: 6.10.1 = 6.10 branch -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2147#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] #2147: unhelpful error message for a misplaced DEPRECATED pragma
#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 | --+- Old description: The error message on a misplaced DEPRECATED pragma is less than helpful. Note that it was the latter of these that bit me. '''% cat Main.hs''' module Main where import Foo.Bar main = return () '''% cat Foo/Bar.hs''' {-# DEPRECATED foo bar #-} module Foo.Bar (foo) where foo = undefined '''% ghc -c Foo/Bar.hs''' Foo/Bar.hs:4:0: parse error on input `module' '''% ghc --make Main.hs''' Foo/Bar.hs:1:0: file name does not match module name `Main' New description: The error message on a misplaced DEPRECATED pragma is less than helpful. Note that it was the latter of these that bit me. '''% cat Main.hs''' {{{ module Main where import Foo.Bar main = return () }}} '''% cat Foo/Bar.hs''' {{{ {-# DEPRECATED foo bar #-} module Foo.Bar (foo) where foo = undefined }}} '''% ghc -c Foo/Bar.hs''' Foo/Bar.hs:4:0: parse error on input `module' '''% ghc --make Main.hs''' Foo/Bar.hs:1:0: file name does not match module name `Main' -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2147#comment:3 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] #2147: unhelpful error message for a misplaced DEPRECATED pragma
#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 Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #2147: unhelpful error message for a misplaced DEPRECATED pragma
#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 | --+- Changes (by igloo): * milestone: 6.8.3 = 6.10.1 -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2147#comment:2 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] #2147: unhelpful error message for a misplaced DEPRECATED pragma
#2147: unhelpful error message for a misplaced DEPRECATED pragma --+- Reporter: guest | Owner: Type: bug | Status: new Priority: normal| Milestone: 6.8.3 Component: Compiler |Version: 6.8.2 Severity: minor | Resolution: Keywords:| Difficulty: Unknown Testcase:| Architecture: Unknown Os: Unknown | --+- Changes (by igloo): * difficulty: = Unknown * milestone: = 6.8.3 Comment: Thanks for the report, we'll take a look. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2147#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
[GHC] #2147: unhelpful error message for a misplaced DEPRECATED pragma
#2147: unhelpful error message for a misplaced DEPRECATED pragma +--- Reporter: guest| Owner: Type: bug | Status: new Priority: normal | Component: Compiler Version: 6.8.2|Severity: minor Keywords: |Testcase: Architecture: Unknown | Os: Unknown +--- The error message on a misplaced DEPRECATED pragma is less than helpful. Note that it was the latter of these that bit me. '''% cat Main.hs''' module Main where import Foo.Bar main = return () '''% cat Foo/Bar.hs''' {-# DEPRECATED foo bar #-} module Foo.Bar (foo) where foo = undefined '''% ghc -c Foo/Bar.hs''' Foo/Bar.hs:4:0: parse error on input `module' '''% ghc --make Main.hs''' Foo/Bar.hs:1:0: file name does not match module name `Main' -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2147 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