Marcin 'Qrczak' Kowalczyk wrote:
> [...] Foreign export does not define a function - it mentions an
> existing function for exporting.
... and gives a type signature, so my example was a bit misleading,
but the argument still remains. And a related bug in GHC:
module Blah where
Blah.f :: String -- GHC allows this (incorrectly)
Blah.f = "GHC/H98 don't allow this"
> Qualified names are allowed in export list in a module header.
> Function from another module can be exported too.
But you can't give a signature for something from another module.
Hmmm, foreign export has a dual function: Giving a signature and
making Haskell stuff usable from the outside world. This is not
nice, signatures and exports are two things for "normal" Haskell.
> Not that I desperately need exporting functions with ambiguous
> names :-)
But nevertheless, it's very useful for the Obfuscated Haskell Contest.
> Functions syntactically looking like constructors? Weird for me...
This weirdness has been recognized a long time ago in Redmond, and has
made its way into "the" API. (Never called DescribePixelFormat or
RegisterClassEx? :-)
Cheers,
Sven
--
Sven Panne Tel.: +49/89/2178-2235
LMU, Institut fuer Informatik FAX : +49/89/2178-2211
LFE Programmier- und Modellierungssprachen Oettingenstr. 67
mailto:[EMAIL PROTECTED] D-80538 Muenchen
http://www.informatik.uni-muenchen.de/~Sven.Panne