[GHC] #2147: unhelpful error message for a misplaced DEPRECATED pragma

GHC trac at galois.com
Tue Mar 11 11:48:56 EDT 2008


#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


More information about the Glasgow-haskell-bugs mailing list