Ticket #47 (closed defect: fixed)

Opened 9 years ago

Last modified 9 years ago

Incorrect warnings for SOURCE pragmas

Reported by: nad Owned by:
Priority: minor Milestone:
Version: Keywords:


Consider the following files:


module A where

x :: a


module A where

import B

x = y


module B where

import {-# SOURCE #-} A

y = x

The SOURCE pragma is clearly necessary (GHC 6.8.3 does not warn about it), but Haddock (both 2.1.0 and the most recent darcs version) gives a warning:

$ haddock A.hs B.hs

    Warning: Unnecessary {-# SOURCE #-} in the import of module `A'

This is quite annoying, since our project relies on -Wall -Werror, cabal haddock reuses the GHC options from the Cabal file, and there is no flag for turning off just the given warning.

This may be related to http://hackage.haskell.org/trac/ghc/ticket/1833, by the way.

Change History

Changed 9 years ago by nad

  • status changed from new to closed
  • resolution set to fixed

This bug appears to have been fixed in Haddock 2.3.0 which ships with GHC 6.10.1.

Note: See TracTickets for help on using tickets.