Skip to content

Allow foreign import declarations to be split into type definition and "implementation" import

Instead of

foreign import ccall unsafe "lookup3.h _jenkins_hashword" hashWord
    :: Ptr Word32 -> CSize -> Word32 -> IO Word32

allow to write

hashWord :: Ptr Word32 -> CSize -> Word32 -> IO Word32
foreign import ccall unsafe "lookup3.h _jenkins_hashword" hashWord

Note: we can get close by

foreign import ccall unsafe "lookup3.h _jenkins_hashword"
 hashWord :: Ptr Word32 -> CSize -> Word32 -> IO Word32

The motivation is that sometimes a function is natively implemented, sometimes it's a FFI import (depending on CPP, or through course of the project), and the vastly different syntax for function declaration is not convenient.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information