[Haskell-cafe] Syntax question regarding 'import'

2008-11-04 Thread Maurí­cio

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

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Syntax question regarding 'import'

2008-11-04 Thread Bulat Ziganshin
Hello Maurí­cio,

Tuesday, November 4, 2008, 3:47:17 PM, you wrote:

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

it simplifies editiing of lists: you can add/remove lines without
changing surrounding ones:

import XXX hiding(
  aaa,
  bbb,
  ccc,
 )


-- 
Best regards,
 Bulatmailto:[EMAIL PROTECTED]

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe