On 14/06/2009 23:24, Ian Lynagh wrote:
On Sun, Jun 14, 2009 at 10:26:45PM +0100, Neil Mitchell wrote:
I've changed it to require -XGHCForeignImportPrim.
The idea of naming a language feature with a compilers name seems like
a bad idea - surely these extensions could possibly work in other
compilers, for example LHC.

It's a bit of an odd one: The Haskell syntax

     foreign import prim "foo" ident :: type

is in principle portable, but whatever lies on the other side (some C--
code in the case of GHC) is almost certainly not.

There are GHC-specific aspects about the form of the declaration too: we'll probably want to have GHC-specific annotations in the string, and the criteria for a well-formed type will be GHC-specific.

So we could just as well have called it 'foreign import ghcprim', but it's not necessary to go that far since this source code will only ever be fed to GHC anyway. Other compilers might well have their own 'foreign import prim' syntax and conventions.

Personally I'd have named it ForeignImportPrim, but I can also see the
logic behind making the name GHC-specific. I don't feel strongly either
way.

I think that ForeignImportGhcPrim is a better name than
GHCForeignImportPrim, though.

I better not express a preference lest we never reach a conclusion on this one :)

Cheers,
        Simon

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to