hs-bindgen-1.0.0.0: test-artefacts/fixtures/macros/macro_ext_binding_dep/th.txt
-- addDependentFile test-artefacts/headers/golden/macros/macro_ext_binding_dep.h
-- #include <macros/macro_ext_binding_dep.h>
-- void hs_bindgen_f70130e6504e0e5e (
-- B arg1
-- )
-- {
-- (use_b)(arg1);
-- }
-- void hs_bindgen_432a5c7b5df51cfa (
-- B arg1
-- )
-- {
-- (use_b)(arg1);
-- }
-- /* test_macrosmacro_ext_binding_dep_Example_get_use_b */
-- __attribute__ ((const))
-- void (*hs_bindgen_b341ec07f48c8cc1 (void)) (
-- B arg1
-- )
-- {
-- return &use_b;
-- }
{-| __C declaration:__ @macro B@
__defined at:__ @macros\/macro_ext_binding_dep.h 6:9@
__exported by:__ @macros\/macro_ext_binding_dep.h@
-}
newtype B = B {unwrapB :: M.A} deriving stock Generic
instance (~) ty M.A => HasField "unwrapB" B ty
where hasField = \x_0 -> (\y_1 -> B{unwrapB = y_1},
getField @"unwrapB" x_0)
instance (~) ty M.A => HasField "unwrapB" (Ptr B) (Ptr ty)
where getField = fromPtr (Proxy @"unwrapB")
instance HasCField B "unwrapB"
where type CFieldType B "unwrapB" = M.A
offset# = \_ -> \_ -> 0
-- __unique:__ @test_macrosmacro_ext_binding_dep_Example_Safe_use_b@
foreign import ccall safe "hs_bindgen_f70130e6504e0e5e" hs_bindgen_f70130e6504e0e5e_base ::
CInt
-> IO ()
-- __unique:__ @test_macrosmacro_ext_binding_dep_Example_Safe_use_b@
hs_bindgen_f70130e6504e0e5e :: B -> IO ()
-- __unique:__ @test_macrosmacro_ext_binding_dep_Example_Safe_use_b@
hs_bindgen_f70130e6504e0e5e = \x_0 -> hs_bindgen_f70130e6504e0e5e_base (toFFIType x_0)
{-| __C declaration:__ @use_b@
__defined at:__ @macros\/macro_ext_binding_dep.h 8:6@
__exported by:__ @macros\/macro_ext_binding_dep.h@
-}
use_b_safe :: B -> IO ()
{-| __C declaration:__ @use_b@
__defined at:__ @macros\/macro_ext_binding_dep.h 8:6@
__exported by:__ @macros\/macro_ext_binding_dep.h@
-}
use_b_safe = hs_bindgen_f70130e6504e0e5e
-- __unique:__ @test_macrosmacro_ext_binding_dep_Example_Unsafe_use_b@
foreign import ccall unsafe "hs_bindgen_432a5c7b5df51cfa" hs_bindgen_432a5c7b5df51cfa_base ::
CInt
-> IO ()
-- __unique:__ @test_macrosmacro_ext_binding_dep_Example_Unsafe_use_b@
hs_bindgen_432a5c7b5df51cfa :: B -> IO ()
-- __unique:__ @test_macrosmacro_ext_binding_dep_Example_Unsafe_use_b@
hs_bindgen_432a5c7b5df51cfa = \x_0 -> hs_bindgen_432a5c7b5df51cfa_base (toFFIType x_0)
{-| __C declaration:__ @use_b@
__defined at:__ @macros\/macro_ext_binding_dep.h 8:6@
__exported by:__ @macros\/macro_ext_binding_dep.h@
-}
use_b_unsafe :: B -> IO ()
{-| __C declaration:__ @use_b@
__defined at:__ @macros\/macro_ext_binding_dep.h 8:6@
__exported by:__ @macros\/macro_ext_binding_dep.h@
-}
use_b_unsafe = hs_bindgen_432a5c7b5df51cfa
-- __unique:__ @test_macrosmacro_ext_binding_dep_Example_get_use_b@
foreign import ccall unsafe "hs_bindgen_b341ec07f48c8cc1" hs_bindgen_b341ec07f48c8cc1_base ::
IO (FunPtr Void)
-- __unique:__ @test_macrosmacro_ext_binding_dep_Example_get_use_b@
hs_bindgen_b341ec07f48c8cc1 :: IO (FunPtr (B -> IO ()))
-- __unique:__ @test_macrosmacro_ext_binding_dep_Example_get_use_b@
hs_bindgen_b341ec07f48c8cc1 = fmap fromFFIType hs_bindgen_b341ec07f48c8cc1_base
{-# NOINLINE use_b_funptr #-}
{-| __C declaration:__ @use_b@
__defined at:__ @macros\/macro_ext_binding_dep.h 8:6@
__exported by:__ @macros\/macro_ext_binding_dep.h@
-}
use_b_funptr :: FunPtr (B -> IO ())
{-| __C declaration:__ @use_b@
__defined at:__ @macros\/macro_ext_binding_dep.h 8:6@
__exported by:__ @macros\/macro_ext_binding_dep.h@
-}
use_b_funptr = unsafePerformIO hs_bindgen_b341ec07f48c8cc1