import Data.Maybe
import Foreign.Ptr ( Ptr, nullPtr )
import Foreign.Storable ( Storable(poke) )
-import Foreign.C.Types ( CSize, CInt(..) )
+import Foreign.C.Types ( CSize )
import Foreign.Marshal.Alloc ( malloc, alloca )
#ifdef __GLASGOW_HASKELL__
import GHC.Base
#endif
+#ifdef __NHC__
+import NHC.FFI ( CInt(..) )
+#endif
+
-- combined allocation and marshalling
-- -----------------------------------