hs-bindgen-1.0.0.0: test-artefacts/fixtures/declarations/declarations_required_for_scoping/th.txt
-- addDependentFile musl-include/x86_64/bits/alltypes.h
-- addDependentFile musl-include/x86_64/stddef.h
-- addDependentFile test-artefacts/headers/golden/declarations/declarations_required_for_scoping.h
-- #include <declarations/declarations_required_for_scoping.h>
-- void hs_bindgen_0d1c75136a36e326 (
-- A arg1
-- )
-- {
-- (f)(arg1);
-- }
-- void hs_bindgen_93ed1628a0edf6b0 (
-- A arg1
-- )
-- {
-- (f)(arg1);
-- }
-- /* test_declarationsdeclarations_requ_Example_get_f */
-- __attribute__ ((const))
-- void (*hs_bindgen_0d4da37880af2263 (void)) (
-- A arg1
-- )
-- {
-- return &f;
-- }
{-| __C declaration:__ @macro A@
__defined at:__ @declarations\/declarations_required_for_scoping.h 5:9@
__exported by:__ @declarations\/declarations_required_for_scoping.h@
-}
newtype A
= A {unwrapA :: HsBindgen.Runtime.LibC.CSize}
deriving stock (Eq, Generic, Ord, Read, Show)
deriving newtype (Bitfield,
Bits,
Bounded,
Enum,
FiniteBits,
HasFFIType,
Integral,
Ix,
Num,
Prim,
ReadRaw,
Real,
StaticSize,
Storable,
WriteRaw)
instance (~) ty HsBindgen.Runtime.LibC.CSize =>
HasField "unwrapA" A ty
where hasField = \x_0 -> (\y_1 -> A{unwrapA = y_1},
getField @"unwrapA" x_0)
instance (~) ty HsBindgen.Runtime.LibC.CSize =>
HasField "unwrapA" (Ptr A) (Ptr ty)
where getField = fromPtr (Proxy @"unwrapA")
instance HasCField A "unwrapA"
where type CFieldType A "unwrapA" = HsBindgen.Runtime.LibC.CSize
offset# = \_ -> \_ -> 0
-- __unique:__ @test_declarationsdeclarations_requ_Example_Safe_f@
foreign import ccall safe "hs_bindgen_0d1c75136a36e326" hs_bindgen_0d1c75136a36e326_base ::
HsBindgen.Runtime.LibC.CSize
-> IO ()
-- __unique:__ @test_declarationsdeclarations_requ_Example_Safe_f@
hs_bindgen_0d1c75136a36e326 :: A -> IO ()
-- __unique:__ @test_declarationsdeclarations_requ_Example_Safe_f@
hs_bindgen_0d1c75136a36e326 = \x_0 -> hs_bindgen_0d1c75136a36e326_base (toFFIType x_0)
{-| __C declaration:__ @f@
__defined at:__ @declarations\/declarations_required_for_scoping.h 7:6@
__exported by:__ @declarations\/declarations_required_for_scoping.h@
-}
f_safe :: A -> IO ()
{-| __C declaration:__ @f@
__defined at:__ @declarations\/declarations_required_for_scoping.h 7:6@
__exported by:__ @declarations\/declarations_required_for_scoping.h@
-}
f_safe = hs_bindgen_0d1c75136a36e326
-- __unique:__ @test_declarationsdeclarations_requ_Example_Unsafe_f@
foreign import ccall unsafe "hs_bindgen_93ed1628a0edf6b0" hs_bindgen_93ed1628a0edf6b0_base ::
HsBindgen.Runtime.LibC.CSize
-> IO ()
-- __unique:__ @test_declarationsdeclarations_requ_Example_Unsafe_f@
hs_bindgen_93ed1628a0edf6b0 :: A -> IO ()
-- __unique:__ @test_declarationsdeclarations_requ_Example_Unsafe_f@
hs_bindgen_93ed1628a0edf6b0 = \x_0 -> hs_bindgen_93ed1628a0edf6b0_base (toFFIType x_0)
{-| __C declaration:__ @f@
__defined at:__ @declarations\/declarations_required_for_scoping.h 7:6@
__exported by:__ @declarations\/declarations_required_for_scoping.h@
-}
f_unsafe :: A -> IO ()
{-| __C declaration:__ @f@
__defined at:__ @declarations\/declarations_required_for_scoping.h 7:6@
__exported by:__ @declarations\/declarations_required_for_scoping.h@
-}
f_unsafe = hs_bindgen_93ed1628a0edf6b0
-- __unique:__ @test_declarationsdeclarations_requ_Example_get_f@
foreign import ccall unsafe "hs_bindgen_0d4da37880af2263" hs_bindgen_0d4da37880af2263_base ::
IO (FunPtr Void)
-- __unique:__ @test_declarationsdeclarations_requ_Example_get_f@
hs_bindgen_0d4da37880af2263 :: IO (FunPtr (A -> IO ()))
-- __unique:__ @test_declarationsdeclarations_requ_Example_get_f@
hs_bindgen_0d4da37880af2263 = fmap fromFFIType hs_bindgen_0d4da37880af2263_base
{-# NOINLINE f_funptr #-}
{-| __C declaration:__ @f@
__defined at:__ @declarations\/declarations_required_for_scoping.h 7:6@
__exported by:__ @declarations\/declarations_required_for_scoping.h@
-}
f_funptr :: FunPtr (A -> IO ())
{-| __C declaration:__ @f@
__defined at:__ @declarations\/declarations_required_for_scoping.h 7:6@
__exported by:__ @declarations\/declarations_required_for_scoping.h@
-}
f_funptr = unsafePerformIO hs_bindgen_0d4da37880af2263