hs-bindgen-1.0.0.0: test-artefacts/fixtures/macros/reparse/gnu_attributes/Example/FunPtr.hs
{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_HADDOCK prune #-}
module Example.FunPtr
( Example.FunPtr.foo
, Example.FunPtr.bar
, Example.FunPtr.dash
, Example.FunPtr.quux
, Example.FunPtr.heq
)
where
import qualified HsBindgen.Runtime.Support as BG
import qualified HsBindgen.Runtime.Support.CAPI
import Example
import Prelude (IO, fmap)
$(HsBindgen.Runtime.Support.CAPI.addCSource (HsBindgen.Runtime.Support.CAPI.unlines
[ "#include <macros/reparse/gnu_attributes.h>"
, "/* test_macrosreparsegnu_attributes_Example_get_foo */"
, "__attribute__ ((const))"
, "void (*hs_bindgen_82e23f370cc161df (void)) ("
, " BOOL arg1"
, ")"
, "{"
, " return &foo;"
, "}"
, "/* test_macrosreparsegnu_attributes_Example_get_bar */"
, "__attribute__ ((const))"
, "void (*hs_bindgen_30ffbacf53832dc4 (void)) ("
, " BOOL arg1"
, ")"
, "{"
, " return &bar;"
, "}"
, "/* test_macrosreparsegnu_attributes_Example_get_dash */"
, "__attribute__ ((const))"
, "void (*hs_bindgen_3cc756628379222d (void)) ("
, " BOOL arg1"
, ")"
, "{"
, " return ‐"
, "}"
, "/* test_macrosreparsegnu_attributes_Example_get_quux */"
, "__attribute__ ((const))"
, "void (*hs_bindgen_c4a1e50d1013ab7d (void)) ("
, " BOOL arg1"
, ")"
, "{"
, " return &quux;"
, "}"
, "/* test_macrosreparsegnu_attributes_Example_get_heq */"
, "__attribute__ ((const))"
, "void (*hs_bindgen_646f1f9d97aa3318 (void)) ("
, " BOOL arg1"
, ")"
, "{"
, " return &heq;"
, "}"
]))
-- __unique:__ @test_macrosreparsegnu_attributes_Example_get_foo@
foreign import ccall unsafe "hs_bindgen_82e23f370cc161df" hs_bindgen_82e23f370cc161df_base ::
IO (BG.FunPtr BG.Void)
-- __unique:__ @test_macrosreparsegnu_attributes_Example_get_foo@
hs_bindgen_82e23f370cc161df :: IO (BG.FunPtr (BOOL -> IO ()))
hs_bindgen_82e23f370cc161df =
fmap BG.fromFFIType hs_bindgen_82e23f370cc161df_base
{-# NOINLINE foo #-}
{-| __C declaration:__ @foo@
__defined at:__ @macros\/reparse\/gnu_attributes.h 3:6@
__exported by:__ @macros\/reparse\/gnu_attributes.h@
-}
foo :: BG.FunPtr (BOOL -> IO ())
foo = BG.unsafePerformIO hs_bindgen_82e23f370cc161df
-- __unique:__ @test_macrosreparsegnu_attributes_Example_get_bar@
foreign import ccall unsafe "hs_bindgen_30ffbacf53832dc4" hs_bindgen_30ffbacf53832dc4_base ::
IO (BG.FunPtr BG.Void)
-- __unique:__ @test_macrosreparsegnu_attributes_Example_get_bar@
hs_bindgen_30ffbacf53832dc4 :: IO (BG.FunPtr (BOOL -> IO ()))
hs_bindgen_30ffbacf53832dc4 =
fmap BG.fromFFIType hs_bindgen_30ffbacf53832dc4_base
{-# NOINLINE bar #-}
{-| __C declaration:__ @bar@
__defined at:__ @macros\/reparse\/gnu_attributes.h 6:46@
__exported by:__ @macros\/reparse\/gnu_attributes.h@
-}
bar :: BG.FunPtr (BOOL -> IO ())
bar = BG.unsafePerformIO hs_bindgen_30ffbacf53832dc4
-- __unique:__ @test_macrosreparsegnu_attributes_Example_get_dash@
foreign import ccall unsafe "hs_bindgen_3cc756628379222d" hs_bindgen_3cc756628379222d_base ::
IO (BG.FunPtr BG.Void)
-- __unique:__ @test_macrosreparsegnu_attributes_Example_get_dash@
hs_bindgen_3cc756628379222d :: IO (BG.FunPtr (BOOL -> IO ()))
hs_bindgen_3cc756628379222d =
fmap BG.fromFFIType hs_bindgen_3cc756628379222d_base
{-# NOINLINE dash #-}
{-| __C declaration:__ @dash@
__defined at:__ @macros\/reparse\/gnu_attributes.h 7:46@
__exported by:__ @macros\/reparse\/gnu_attributes.h@
-}
dash :: BG.FunPtr (BOOL -> IO ())
dash = BG.unsafePerformIO hs_bindgen_3cc756628379222d
-- __unique:__ @test_macrosreparsegnu_attributes_Example_get_quux@
foreign import ccall unsafe "hs_bindgen_c4a1e50d1013ab7d" hs_bindgen_c4a1e50d1013ab7d_base ::
IO (BG.FunPtr BG.Void)
-- __unique:__ @test_macrosreparsegnu_attributes_Example_get_quux@
hs_bindgen_c4a1e50d1013ab7d :: IO (BG.FunPtr (BOOL -> IO ()))
hs_bindgen_c4a1e50d1013ab7d =
fmap BG.fromFFIType hs_bindgen_c4a1e50d1013ab7d_base
{-# NOINLINE quux #-}
{-| __C declaration:__ @quux@
__defined at:__ @macros\/reparse\/gnu_attributes.h 11:13@
__exported by:__ @macros\/reparse\/gnu_attributes.h@
-}
quux :: BG.FunPtr (BOOL -> IO ())
quux = BG.unsafePerformIO hs_bindgen_c4a1e50d1013ab7d
-- __unique:__ @test_macrosreparsegnu_attributes_Example_get_heq@
foreign import ccall unsafe "hs_bindgen_646f1f9d97aa3318" hs_bindgen_646f1f9d97aa3318_base ::
IO (BG.FunPtr BG.Void)
-- __unique:__ @test_macrosreparsegnu_attributes_Example_get_heq@
hs_bindgen_646f1f9d97aa3318 :: IO (BG.FunPtr (BOOL -> IO ()))
hs_bindgen_646f1f9d97aa3318 =
fmap BG.fromFFIType hs_bindgen_646f1f9d97aa3318_base
{-# NOINLINE heq #-}
{-| __C declaration:__ @heq@
__defined at:__ @macros\/reparse\/gnu_attributes.h 12:13@
__exported by:__ @macros\/reparse\/gnu_attributes.h@
-}
heq :: BG.FunPtr (BOOL -> IO ())
heq = BG.unsafePerformIO hs_bindgen_646f1f9d97aa3318