UnliftedFFITypes: Allow `(# #)` as argument when it's the only argument.
This allows representing functions like: int foo(void); to be imported like this: foreign import ccall "a_number_c" c_number :: (# #) -> Int64# Which can be useful when the imported function isn't implicitly stateful.
Showing
- compiler/GHC/Core/TyCon.hs 1 addition, 0 deletionscompiler/GHC/Core/TyCon.hs
- compiler/GHC/HsToCore/Foreign/Call.hs 4 additions, 1 deletioncompiler/GHC/HsToCore/Foreign/Call.hs
- compiler/GHC/Tc/Gen/Foreign.hs 17 additions, 1 deletioncompiler/GHC/Tc/Gen/Foreign.hs
- docs/users_guide/9.12.1-notes.rst 3 additions, 0 deletionsdocs/users_guide/9.12.1-notes.rst
- docs/users_guide/exts/ffi.rst 7 additions, 3 deletionsdocs/users_guide/exts/ffi.rst
- testsuite/tests/ffi/should_run/T24818.hs 22 additions, 0 deletionstestsuite/tests/ffi/should_run/T24818.hs
- testsuite/tests/ffi/should_run/T24818.stdout 2 additions, 0 deletionstestsuite/tests/ffi/should_run/T24818.stdout
- testsuite/tests/ffi/should_run/T24818_c.c 8 additions, 0 deletionstestsuite/tests/ffi/should_run/T24818_c.c
- testsuite/tests/ffi/should_run/T24818_cmm.cmm 5 additions, 0 deletionstestsuite/tests/ffi/should_run/T24818_cmm.cmm
- testsuite/tests/ffi/should_run/all.T 1 addition, 0 deletionstestsuite/tests/ffi/should_run/all.T
Loading
Please register or sign in to comment