Exactly which entities are to be imported can be specified in one of the following three ways:
The list must name only entities exported by the imported module. The list may be empty, in which case nothing except the instances is imported.
On Tue, Dec 1, 2009 at 3:11 PM, Sean McLaughlin <seanmcl@gmail.com> wrote:Say I have the following module:----------------------------------------module A( T(T), t, val)wheredata T = T { t :: Int }val :: Tval = T 7----------------------------------------When I use A with the following imports, I don't expect this to work,but it does:import qualified Aimport A(T(..))main = putStrLn $ show $ t A.valThe problem is that I explicitly didn't export 't' as an element of T(by not writing T(..)).Am I just misunderstanding how exports work? I couldn't figure outwhat the correctbehavior should be by looking at the 98 report.
Oh interesting. What a crazy corner case. I also feel like your
program shouldn't be valid. Maybe it's a bug?
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe