hs-bindgen-1.0.0.0: test-artefacts/fixtures/functions/hash_defines/Example/FunPtr.hs
{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_HADDOCK prune #-}
module Example.FunPtr
( Example.FunPtr.hash_defines_feature
, Example.FunPtr.hash_defines_empty
)
where
import qualified HsBindgen.Runtime.Support as BG
import qualified HsBindgen.Runtime.Support.CAPI
import Prelude (IO, fmap)
$(HsBindgen.Runtime.Support.CAPI.addCSource (HsBindgen.Runtime.Support.CAPI.unlines
[ "#define MY_FEATURE 1"
, "#define MY_SIZE 8"
, "#define MY_EMPTY"
, "#include <functions/hash_defines.h>"
, "/* test_functionshash_defines_Example_get_hash_defines_feature */"
, "__attribute__ ((const))"
, "signed int (*hs_bindgen_ebc7bd37f43918fa (void)) ("
, " signed int arg1"
, ")"
, "{"
, " return &hash_defines_feature;"
, "}"
, "/* test_functionshash_defines_Example_get_hash_defines_empty */"
, "__attribute__ ((const))"
, "signed int (*hs_bindgen_11624d9d43a105dc (void)) (void)"
, "{"
, " return &hash_defines_empty;"
, "}"
]))
-- __unique:__ @test_functionshash_defines_Example_get_hash_defines_feature@
foreign import ccall unsafe "hs_bindgen_ebc7bd37f43918fa" hs_bindgen_ebc7bd37f43918fa_base ::
IO (BG.FunPtr BG.Void)
-- __unique:__ @test_functionshash_defines_Example_get_hash_defines_feature@
hs_bindgen_ebc7bd37f43918fa :: IO (BG.FunPtr (BG.CInt -> IO BG.CInt))
hs_bindgen_ebc7bd37f43918fa =
fmap BG.fromFFIType hs_bindgen_ebc7bd37f43918fa_base
{-# NOINLINE hash_defines_feature #-}
{-| __C declaration:__ @hash_defines_feature@
__defined at:__ @functions\/hash_defines.h 9:5@
__exported by:__ @functions\/hash_defines.h@
-}
hash_defines_feature :: BG.FunPtr (BG.CInt -> IO BG.CInt)
hash_defines_feature =
BG.unsafePerformIO hs_bindgen_ebc7bd37f43918fa
-- __unique:__ @test_functionshash_defines_Example_get_hash_defines_empty@
foreign import ccall unsafe "hs_bindgen_11624d9d43a105dc" hs_bindgen_11624d9d43a105dc_base ::
IO (BG.FunPtr BG.Void)
-- __unique:__ @test_functionshash_defines_Example_get_hash_defines_empty@
hs_bindgen_11624d9d43a105dc :: IO (BG.FunPtr (IO BG.CInt))
hs_bindgen_11624d9d43a105dc =
fmap BG.fromFFIType hs_bindgen_11624d9d43a105dc_base
{-# NOINLINE hash_defines_empty #-}
{-| __C declaration:__ @hash_defines_empty@
__defined at:__ @functions\/hash_defines.h 20:5@
__exported by:__ @functions\/hash_defines.h@
-}
hash_defines_empty :: BG.FunPtr (IO BG.CInt)
hash_defines_empty =
BG.unsafePerformIO hs_bindgen_11624d9d43a105dc