Consider the following two modules

        ----------------------------------------
        module A (A_a) where
        newtype A_a a = A_a (a,a)
        ----------------------------------------

which compiles fine, and

        ----------------------------------------
        module Main where
        import A
        main = putStrLn (show (A_a (3,5)))
        ----------------------------------------

compilitation yields (ghc 2.10.1 on i386-linux)

        ----------------------------------------
        $ ghc -c Main.hs 
 
        Main.hs:3: Data constructor not in scope: `A_a'

        Compilation had errors
        ----------------------------------------

The same happens for this one

        ----------------------------------------
        module Main where
        import A (A_a)
        main = putStrLn (show (A_a (3,5)))
        ----------------------------------------

and this one

        ----------------------------------------
        module A (A_a) where
        data A_a a = A_a (a,a)
        ----------------------------------------

It's a bug, not a feature, isn't it ?

Bye, 

Joern

-- 
Joern Dinkla, Z"ulpicher Stra\ss e 56, 50674 K"oln, Germany
[EMAIL PROTECTED]                        +49-221-421723

Reply via email to