[Haskell-cafe] Syntax question regarding 'import'

Maurí­cio briqueabraque at yahoo.com
Tue Nov 4 07:47:17 EST 2008


Hi,

About this teste code:

module Main (main) where {
import Foreign hiding (unsafePerformIO,Foreign.Ptr,Data.Bits,) ;
blo = xor 10 10 :: Int ;
main = return ()
}

Data.Bits is in the 'hiding' list. According to
the syntax reference, this seems not to be allowed.
GHC allows it, but do allow following code to use
'xor' from Data.Bits. I think this is correct, since
'xor' was exported by Foreign unqualified, but does
'Data.Bits' in that list mean something or it's
just ignored?

Haskell syntax allows a comma at the end of names
to be imported or exported, like in the second
line. What does that mean?

Thanks,
Maurício



More information about the Haskell-Cafe mailing list