Writing this does not currently raise a warning:
module ReExport
( module A
, module B
) where
import Data.Functor as A
import Data.Semigroup as B
But it should, as it suffers from the same issue as this:
module ReExport
( module Data.Functor
, module Data.Semigroup
) where
import Data.Functor
import Data.Semigroup
Which does warn, asking for explicit imports from both modules, as they're being opened into the same namespace. In the first example this is also true as A and B are merged into one namespace in the exports of the module.
No doubt this will annoy people, unfortunately, as I'm pretty sure it's used to work around the export rules as they stand in some libraries - but we should at least apply the rules consistently or give up on safe import behaviour entirely.
Writing this does not currently raise a warning:
But it should, as it suffers from the same issue as this:
Which does warn, asking for explicit imports from both modules, as they're being opened into the same namespace. In the first example this is also true as
AandBare merged into one namespace in the exports of the module.No doubt this will annoy people, unfortunately, as I'm pretty sure it's used to work around the export rules as they stand in some libraries - but we should at least apply the rules consistently or give up on safe import behaviour entirely.