#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
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs