Ticket #47 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

Incorrect warnings for SOURCE pragmas

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

Description

Consider the following files:

A.hs-boot:

module A where

x :: a

A.hs:

module A where

import B

x = y

B.hs:

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

B.hs:3:0:
    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 6 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.