On Sat, Nov 04, 2006 at 09:39:39PM +0200, Slavomir Kaslev wrote:
> To: [email protected]
> From: Slavomir Kaslev <[EMAIL PROTECTED]>
> Date: Sat, 4 Nov 2006 21:39:39 +0200
> Subject: [Haskell-cafe] Module visibility of data type constructors
> 
> Hello. I have a simple question for data type constructors visibility.
> Take a look:
> 
> module Foo (Bar) where
> data Bar = Bar
> 
> In ghc this allows me to use Bar, the type constructor, in another
> module, although it shouldn't be visible outside Foo. On the other
> hand, if I change Bar's definition as:
> 
> data Bar = Baz
> 
> Baz isn't visible outside Foo.
> 
> Is this the correct behavior or is it bug in ghc?

It's not the correct behavior.  The question is whether the bug is in
your code or in ghc (with me it's usually the former :-).

I can't reproduce this with my ghc 6.4.  Which version are you using?
Can you post the other module you are talking about?


matthias

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to