hs-bindgen-1.0.0.0: test-artefacts/fixtures/binding-specs/relative_include/sub/consumer/th.txt
-- addDependentFile test-artefacts/headers/golden/binding-specs/relative_include/core.h
-- addDependentFile test-artefacts/headers/golden/binding-specs/relative_include/sub/consumer.h
-- #include <binding-specs/relative_include/sub/consumer.h>
-- void hs_bindgen_13e66cb2f49fb393 (
-- widget_legacy_t *arg1
-- )
-- {
-- (use_widget)(arg1);
-- }
-- void hs_bindgen_206a5cae524a3fcb (
-- widget_legacy_t *arg1
-- )
-- {
-- (use_widget)(arg1);
-- }
-- /* test_bindingspecsrelative_include_Example_get_use_widget */
-- __attribute__ ((const))
-- void (*hs_bindgen_33ccb2801b32fc12 (void)) (
-- widget_legacy_t *arg1
-- )
-- {
-- return &use_widget;
-- }
{-| __C declaration:__ @widget_legacy_t@
__defined at:__ @binding-specs\/relative_include\/sub\/consumer.h 19:25@
__exported by:__ @binding-specs\/relative_include\/sub\/consumer.h@
-}
newtype Widget_legacy_t
= Widget_legacy_t {unwrapWidget_legacy_t :: M.WidgetT}
deriving stock Generic
instance (~) ty M.WidgetT =>
HasField "unwrapWidget_legacy_t" Widget_legacy_t ty
where hasField = \x_0 -> (\y_1 -> Widget_legacy_t{unwrapWidget_legacy_t = y_1},
getField @"unwrapWidget_legacy_t" x_0)
instance (~) ty M.WidgetT =>
HasField "unwrapWidget_legacy_t" (Ptr Widget_legacy_t) (Ptr ty)
where getField = fromPtr (Proxy @"unwrapWidget_legacy_t")
instance HasCField Widget_legacy_t "unwrapWidget_legacy_t"
where type CFieldType Widget_legacy_t
"unwrapWidget_legacy_t" = M.WidgetT
offset# = \_ -> \_ -> 0
-- __unique:__ @test_bindingspecsrelative_include_Example_Safe_use_widget@
foreign import ccall safe "hs_bindgen_13e66cb2f49fb393" hs_bindgen_13e66cb2f49fb393_base ::
Ptr Void
-> IO ()
-- __unique:__ @test_bindingspecsrelative_include_Example_Safe_use_widget@
hs_bindgen_13e66cb2f49fb393 :: Ptr Widget_legacy_t -> IO ()
-- __unique:__ @test_bindingspecsrelative_include_Example_Safe_use_widget@
hs_bindgen_13e66cb2f49fb393 = \x_0 -> hs_bindgen_13e66cb2f49fb393_base (toFFIType x_0)
{-| __C declaration:__ @use_widget@
__defined at:__ @binding-specs\/relative_include\/sub\/consumer.h 21:6@
__exported by:__ @binding-specs\/relative_include\/sub\/consumer.h@
-}
use_widget_safe :: Ptr Widget_legacy_t -> IO ()
{-| __C declaration:__ @use_widget@
__defined at:__ @binding-specs\/relative_include\/sub\/consumer.h 21:6@
__exported by:__ @binding-specs\/relative_include\/sub\/consumer.h@
-}
use_widget_safe = hs_bindgen_13e66cb2f49fb393
-- __unique:__ @test_bindingspecsrelative_include_Example_Unsafe_use_widget@
foreign import ccall unsafe "hs_bindgen_206a5cae524a3fcb" hs_bindgen_206a5cae524a3fcb_base ::
Ptr Void
-> IO ()
-- __unique:__ @test_bindingspecsrelative_include_Example_Unsafe_use_widget@
hs_bindgen_206a5cae524a3fcb :: Ptr Widget_legacy_t -> IO ()
-- __unique:__ @test_bindingspecsrelative_include_Example_Unsafe_use_widget@
hs_bindgen_206a5cae524a3fcb = \x_0 -> hs_bindgen_206a5cae524a3fcb_base (toFFIType x_0)
{-| __C declaration:__ @use_widget@
__defined at:__ @binding-specs\/relative_include\/sub\/consumer.h 21:6@
__exported by:__ @binding-specs\/relative_include\/sub\/consumer.h@
-}
use_widget_unsafe :: Ptr Widget_legacy_t -> IO ()
{-| __C declaration:__ @use_widget@
__defined at:__ @binding-specs\/relative_include\/sub\/consumer.h 21:6@
__exported by:__ @binding-specs\/relative_include\/sub\/consumer.h@
-}
use_widget_unsafe = hs_bindgen_206a5cae524a3fcb
-- __unique:__ @test_bindingspecsrelative_include_Example_get_use_widget@
foreign import ccall unsafe "hs_bindgen_33ccb2801b32fc12" hs_bindgen_33ccb2801b32fc12_base ::
IO (FunPtr Void)
-- __unique:__ @test_bindingspecsrelative_include_Example_get_use_widget@
hs_bindgen_33ccb2801b32fc12 :: IO (FunPtr (Ptr Widget_legacy_t ->
IO ()))
-- __unique:__ @test_bindingspecsrelative_include_Example_get_use_widget@
hs_bindgen_33ccb2801b32fc12 = fmap fromFFIType hs_bindgen_33ccb2801b32fc12_base
{-# NOINLINE use_widget_funptr #-}
{-| __C declaration:__ @use_widget@
__defined at:__ @binding-specs\/relative_include\/sub\/consumer.h 21:6@
__exported by:__ @binding-specs\/relative_include\/sub\/consumer.h@
-}
use_widget_funptr :: FunPtr (Ptr Widget_legacy_t -> IO ())
{-| __C declaration:__ @use_widget@
__defined at:__ @binding-specs\/relative_include\/sub\/consumer.h 21:6@
__exported by:__ @binding-specs\/relative_include\/sub\/consumer.h@
-}
use_widget_funptr = unsafePerformIO hs_bindgen_33ccb2801b32fc12