hs-bindgen-1.0.0.0: test-artefacts/fixtures/binding-specs/fun_arg/macro/struct/Example/FunPtr.hs
{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_HADDOCK prune #-}
module Example.FunPtr
( Example.FunPtr.foo
, Example.FunPtr.fooA
, Example.FunPtr.fooB
, Example.FunPtr.fooC
, Example.FunPtr.fooD
, Example.FunPtr.fooE
)
where
import qualified HsBindgen.Runtime.Support as BG
import qualified HsBindgen.Runtime.Support.CAPI
import qualified M
import Example
import Prelude (IO, fmap)
$(HsBindgen.Runtime.Support.CAPI.addCSource (HsBindgen.Runtime.Support.CAPI.unlines
[ "#include <binding-specs/fun_arg/macro/struct.h>"
, "/* test_bindingspecsfun_argmacrost_Example_get_foo */"
, "__attribute__ ((const))"
, "void (*hs_bindgen_ccfc23165c7fd4a9 (void)) ("
, " struct MyStruct arg1"
, ")"
, "{"
, " return &foo;"
, "}"
, "/* test_bindingspecsfun_argmacrost_Example_get_fooA */"
, "__attribute__ ((const))"
, "void (*hs_bindgen_ab74a4a30349b6b2 (void)) ("
, " A arg1"
, ")"
, "{"
, " return &fooA;"
, "}"
, "/* test_bindingspecsfun_argmacrost_Example_get_fooB */"
, "__attribute__ ((const))"
, "void (*hs_bindgen_19855bed49223360 (void)) ("
, " B arg1"
, ")"
, "{"
, " return &fooB;"
, "}"
, "/* test_bindingspecsfun_argmacrost_Example_get_fooC */"
, "__attribute__ ((const))"
, "void (*hs_bindgen_11912ef040cef859 (void)) ("
, " C arg1"
, ")"
, "{"
, " return &fooC;"
, "}"
, "/* test_bindingspecsfun_argmacrost_Example_get_fooD */"
, "__attribute__ ((const))"
, "void (*hs_bindgen_45e77aca55d2f794 (void)) ("
, " D arg1"
, ")"
, "{"
, " return &fooD;"
, "}"
, "/* test_bindingspecsfun_argmacrost_Example_get_fooE */"
, "__attribute__ ((const))"
, "void (*hs_bindgen_d8f4dbc2ffc05918 (void)) ("
, " E arg1"
, ")"
, "{"
, " return &fooE;"
, "}"
]))
-- __unique:__ @test_bindingspecsfun_argmacrost_Example_get_foo@
foreign import ccall unsafe "hs_bindgen_ccfc23165c7fd4a9" hs_bindgen_ccfc23165c7fd4a9_base ::
IO (BG.FunPtr BG.Void)
-- __unique:__ @test_bindingspecsfun_argmacrost_Example_get_foo@
hs_bindgen_ccfc23165c7fd4a9 :: IO (BG.FunPtr (MyStruct -> IO ()))
hs_bindgen_ccfc23165c7fd4a9 =
fmap BG.fromFFIType hs_bindgen_ccfc23165c7fd4a9_base
{-# NOINLINE foo #-}
{-| __C declaration:__ @foo@
__defined at:__ @binding-specs\/fun_arg\/macro\/struct.h 8:6@
__exported by:__ @binding-specs\/fun_arg\/macro\/struct.h@
-}
foo :: BG.FunPtr (MyStruct -> IO ())
foo = BG.unsafePerformIO hs_bindgen_ccfc23165c7fd4a9
-- __unique:__ @test_bindingspecsfun_argmacrost_Example_get_fooA@
foreign import ccall unsafe "hs_bindgen_ab74a4a30349b6b2" hs_bindgen_ab74a4a30349b6b2_base ::
IO (BG.FunPtr BG.Void)
-- __unique:__ @test_bindingspecsfun_argmacrost_Example_get_fooA@
hs_bindgen_ab74a4a30349b6b2 :: IO (BG.FunPtr (A -> IO ()))
hs_bindgen_ab74a4a30349b6b2 =
fmap BG.fromFFIType hs_bindgen_ab74a4a30349b6b2_base
{-# NOINLINE fooA #-}
{-| __C declaration:__ @fooA@
__defined at:__ @binding-specs\/fun_arg\/macro\/struct.h 14:6@
__exported by:__ @binding-specs\/fun_arg\/macro\/struct.h@
-}
fooA :: BG.FunPtr (A -> IO ())
fooA = BG.unsafePerformIO hs_bindgen_ab74a4a30349b6b2
-- __unique:__ @test_bindingspecsfun_argmacrost_Example_get_fooB@
foreign import ccall unsafe "hs_bindgen_19855bed49223360" hs_bindgen_19855bed49223360_base ::
IO (BG.FunPtr BG.Void)
-- __unique:__ @test_bindingspecsfun_argmacrost_Example_get_fooB@
hs_bindgen_19855bed49223360 :: IO (BG.FunPtr (B -> IO ()))
hs_bindgen_19855bed49223360 =
fmap BG.fromFFIType hs_bindgen_19855bed49223360_base
{-# NOINLINE fooB #-}
{-| __C declaration:__ @fooB@
__defined at:__ @binding-specs\/fun_arg\/macro\/struct.h 15:6@
__exported by:__ @binding-specs\/fun_arg\/macro\/struct.h@
-}
fooB :: BG.FunPtr (B -> IO ())
fooB = BG.unsafePerformIO hs_bindgen_19855bed49223360
-- __unique:__ @test_bindingspecsfun_argmacrost_Example_get_fooC@
foreign import ccall unsafe "hs_bindgen_11912ef040cef859" hs_bindgen_11912ef040cef859_base ::
IO (BG.FunPtr BG.Void)
-- __unique:__ @test_bindingspecsfun_argmacrost_Example_get_fooC@
hs_bindgen_11912ef040cef859 :: IO (BG.FunPtr (M.C -> IO ()))
hs_bindgen_11912ef040cef859 =
fmap BG.fromFFIType hs_bindgen_11912ef040cef859_base
{-# NOINLINE fooC #-}
{-| __C declaration:__ @fooC@
__defined at:__ @binding-specs\/fun_arg\/macro\/struct.h 37:6@
__exported by:__ @binding-specs\/fun_arg\/macro\/struct.h@
-}
fooC :: BG.FunPtr (M.C -> IO ())
fooC = BG.unsafePerformIO hs_bindgen_11912ef040cef859
-- __unique:__ @test_bindingspecsfun_argmacrost_Example_get_fooD@
foreign import ccall unsafe "hs_bindgen_45e77aca55d2f794" hs_bindgen_45e77aca55d2f794_base ::
IO (BG.FunPtr BG.Void)
-- __unique:__ @test_bindingspecsfun_argmacrost_Example_get_fooD@
hs_bindgen_45e77aca55d2f794 :: IO (BG.FunPtr (M.D -> IO ()))
hs_bindgen_45e77aca55d2f794 =
fmap BG.fromFFIType hs_bindgen_45e77aca55d2f794_base
{-# NOINLINE fooD #-}
{-| __C declaration:__ @fooD@
__defined at:__ @binding-specs\/fun_arg\/macro\/struct.h 38:6@
__exported by:__ @binding-specs\/fun_arg\/macro\/struct.h@
-}
fooD :: BG.FunPtr (M.D -> IO ())
fooD = BG.unsafePerformIO hs_bindgen_45e77aca55d2f794
-- __unique:__ @test_bindingspecsfun_argmacrost_Example_get_fooE@
foreign import ccall unsafe "hs_bindgen_d8f4dbc2ffc05918" hs_bindgen_d8f4dbc2ffc05918_base ::
IO (BG.FunPtr BG.Void)
-- __unique:__ @test_bindingspecsfun_argmacrost_Example_get_fooE@
hs_bindgen_d8f4dbc2ffc05918 :: IO (BG.FunPtr (E -> IO ()))
hs_bindgen_d8f4dbc2ffc05918 =
fmap BG.fromFFIType hs_bindgen_d8f4dbc2ffc05918_base
{-# NOINLINE fooE #-}
{-| __C declaration:__ @fooE@
__defined at:__ @binding-specs\/fun_arg\/macro\/struct.h 39:6@
__exported by:__ @binding-specs\/fun_arg\/macro\/struct.h@
-}
fooE :: BG.FunPtr (E -> IO ())
fooE = BG.unsafePerformIO hs_bindgen_d8f4dbc2ffc05918