hs-boot files can have bogus declarations if they're not exported
Consider:
-- A.hs-boot
module A(foo) where
foo :: A -> Int
data A = AC { bar :: Int } | CC
-- NB: A is not exported
-- B.hs
module B where
import {-# SOURCE #-} A
-- A.hs
module A(foo) where
import B
data A = AC { foo :: Int } | BC
GHC won't complain that A
is incompatibly defined, since it's not exported.
Seems relatively harmless though.