On 16/02/2012 20:56, Ian Lynagh wrote:
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/546dd4f219ba05880e252e7fee6a2037a50ed3b3

---------------------------------------------------------------

commit 546dd4f219ba05880e252e7fee6a2037a50ed3b3
Author: Ian Lynagh<[email protected]>
Date:   Wed Feb 15 14:55:23 2012 +0000

     Implement the CTYPE pragma; part of the CApiFFI extension

     For now, the syntax is
         type    {-# CTYPE "some C type" #-} Foo = ...
         newtype {-# CTYPE "some C type" #-} Foo = ...
         data    {-# CTYPE "some C type" #-} Foo = ...

Don't we now have a problem with needing header files to define these types? What if a module in another package uses one of these types in a foreign import capi?

Also, attaching C types to type synonyms seems a bit fragile - type synonyms are ephemeral things, and I'm worried the type annotation could easily get lost.

Cheers,
        Simon

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

Reply via email to