FFI progress

Simon Peyton-Jones simonpj at microsoft.com
Wed Apr 11 17:54:35 EDT 2001

| In case you aren't aware of this, Windows DLL's by default, (actually
| always, as far as I know) use the stdcall (Pascal) calling convention.
| I personally hope that you won't drop anything which facilitates using
| Haskell under Windows.

Dead right.  I wasn't proposing removing the functionality, just
how to get at it.  More concretely, there are two alternatives

1.  Treat C-via-stdcall and C-via-ccall as two different "languages".
		foreign import "C/stdcall" "gtk:foo" foo :: Int -> IO

2.  Treat C as one language, but put the calling convention into the
specific string.  E.g.
		foreign import "C" "stdcall/ gtk:foo" foo :: Int -> IO

I prefer (1) but it's not a big deal.  



More information about the FFI mailing list