-- addDependentFile examples/golden/binding-specs/fun_arg/macro/struct.h
-- #include <binding-specs/fun_arg/macro/struct.h>
-- void hs_bindgen_f2a9c7d0ba1aaa3b (
--   struct MyStruct *arg1
-- )
-- {
--   foo(*arg1);
-- }
-- void hs_bindgen_d7efef1db7e6b005 (
--   A *arg1
-- )
-- {
--   fooA(*arg1);
-- }
-- void hs_bindgen_e49c2e985e471c99 (
--   B *arg1
-- )
-- {
--   fooB(*arg1);
-- }
-- void hs_bindgen_9dbeca9fa307eee9 (
--   struct MyStruct *arg1
-- )
-- {
--   foo(*arg1);
-- }
-- void hs_bindgen_fb94ee6f22de1d89 (
--   A *arg1
-- )
-- {
--   fooA(*arg1);
-- }
-- void hs_bindgen_f8f83a7090687b7e (
--   B *arg1
-- )
-- {
--   fooB(*arg1);
-- }
-- /* 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;
-- }
{-| __C declaration:__ @struct MyStruct@

    __defined at:__ @binding-specs\/fun_arg\/macro\/struct.h 4:8@

    __exported by:__ @binding-specs\/fun_arg\/macro\/struct.h@
-}
data MyStruct
    = MyStruct {myStruct_x :: CInt
                {- ^ __C declaration:__ @x@

                     __defined at:__ @binding-specs\/fun_arg\/macro\/struct.h 4:23@

                     __exported by:__ @binding-specs\/fun_arg\/macro\/struct.h@
                -}}
      {- ^ __C declaration:__ @struct MyStruct@

           __defined at:__ @binding-specs\/fun_arg\/macro\/struct.h 4:8@

           __exported by:__ @binding-specs\/fun_arg\/macro\/struct.h@
      -}
    deriving stock (Eq, Show)
instance StaticSize MyStruct
    where staticSizeOf = \_ -> 4 :: Int
          staticAlignment = \_ -> 4 :: Int
instance ReadRaw MyStruct
    where readRaw = \ptr_0 -> pure MyStruct <*> readRaw (Proxy @"myStruct_x") ptr_0
instance WriteRaw MyStruct
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       MyStruct myStruct_x_2 -> writeRaw (Proxy @"myStruct_x") ptr_0 myStruct_x_2
deriving via (EquivStorable MyStruct) instance Storable MyStruct
instance HasCField MyStruct "myStruct_x"
    where type CFieldType MyStruct "myStruct_x" = CInt
          offset# = \_ -> \_ -> 0
instance TyEq ty (CFieldType MyStruct "myStruct_x") =>
         HasField "myStruct_x" (Ptr MyStruct) (Ptr ty)
    where getField = fromPtr (Proxy @"myStruct_x")
{-| __C declaration:__ @A@

    __defined at:__ @binding-specs\/fun_arg\/macro\/struct.h 7:9@

    __exported by:__ @binding-specs\/fun_arg\/macro\/struct.h@
-}
newtype A
    = A {unwrapA :: MyStruct}
      {- ^ __C declaration:__ @A@

           __defined at:__ @binding-specs\/fun_arg\/macro\/struct.h 7:9@

           __exported by:__ @binding-specs\/fun_arg\/macro\/struct.h@
      -}
    deriving stock (Eq, Show)
    deriving newtype (StaticSize, ReadRaw, WriteRaw, Storable)
instance TyEq ty (CFieldType A "unwrapA") =>
         HasField "unwrapA" (Ptr A) (Ptr ty)
    where getField = fromPtr (Proxy @"unwrapA")
instance HasCField A "unwrapA"
    where type CFieldType A "unwrapA" = MyStruct
          offset# = \_ -> \_ -> 0
{-| __C declaration:__ @B@

    __defined at:__ @binding-specs\/fun_arg\/macro\/struct.h 8:9@

    __exported by:__ @binding-specs\/fun_arg\/macro\/struct.h@
-}
newtype B
    = B {unwrapB :: A}
      {- ^ __C declaration:__ @B@

           __defined at:__ @binding-specs\/fun_arg\/macro\/struct.h 8:9@

           __exported by:__ @binding-specs\/fun_arg\/macro\/struct.h@
      -}
    deriving stock (Eq, Show)
    deriving newtype (StaticSize, ReadRaw, WriteRaw, Storable)
instance TyEq ty (CFieldType B "unwrapB") =>
         HasField "unwrapB" (Ptr B) (Ptr ty)
    where getField = fromPtr (Proxy @"unwrapB")
instance HasCField B "unwrapB"
    where type CFieldType B "unwrapB" = A
          offset# = \_ -> \_ -> 0
-- __unique:__ @test_bindingspecsfun_argmacrost_Example_Safe_foo@
foreign import ccall safe "hs_bindgen_f2a9c7d0ba1aaa3b" hs_bindgen_f2a9c7d0ba1aaa3b_base ::
    Ptr Void
 -> IO Unit
-- __unique:__ @test_bindingspecsfun_argmacrost_Example_Safe_foo@
hs_bindgen_f2a9c7d0ba1aaa3b :: Ptr MyStruct -> IO Unit
-- __unique:__ @test_bindingspecsfun_argmacrost_Example_Safe_foo@
hs_bindgen_f2a9c7d0ba1aaa3b = fromFFIType hs_bindgen_f2a9c7d0ba1aaa3b_base
{-| __C declaration:__ @foo@

    __defined at:__ @binding-specs\/fun_arg\/macro\/struct.h 5:6@

    __exported by:__ @binding-specs\/fun_arg\/macro\/struct.h@
-}
foo :: MyStruct -> IO Unit
{-| __C declaration:__ @foo@

    __defined at:__ @binding-specs\/fun_arg\/macro\/struct.h 5:6@

    __exported by:__ @binding-specs\/fun_arg\/macro\/struct.h@
-}
foo = \x_0 -> with x_0 (\x_1 -> hs_bindgen_f2a9c7d0ba1aaa3b x_1)
-- __unique:__ @test_bindingspecsfun_argmacrost_Example_Safe_fooA@
foreign import ccall safe "hs_bindgen_d7efef1db7e6b005" hs_bindgen_d7efef1db7e6b005_base ::
    Ptr Void
 -> IO Unit
-- __unique:__ @test_bindingspecsfun_argmacrost_Example_Safe_fooA@
hs_bindgen_d7efef1db7e6b005 :: Ptr A -> IO Unit
-- __unique:__ @test_bindingspecsfun_argmacrost_Example_Safe_fooA@
hs_bindgen_d7efef1db7e6b005 = fromFFIType hs_bindgen_d7efef1db7e6b005_base
{-| __C declaration:__ @fooA@

    __defined at:__ @binding-specs\/fun_arg\/macro\/struct.h 10:6@

    __exported by:__ @binding-specs\/fun_arg\/macro\/struct.h@
-}
fooA :: A -> IO Unit
{-| __C declaration:__ @fooA@

    __defined at:__ @binding-specs\/fun_arg\/macro\/struct.h 10:6@

    __exported by:__ @binding-specs\/fun_arg\/macro\/struct.h@
-}
fooA = \x_0 -> with x_0 (\x_1 -> hs_bindgen_d7efef1db7e6b005 x_1)
-- __unique:__ @test_bindingspecsfun_argmacrost_Example_Safe_fooB@
foreign import ccall safe "hs_bindgen_e49c2e985e471c99" hs_bindgen_e49c2e985e471c99_base ::
    Ptr Void
 -> IO Unit
-- __unique:__ @test_bindingspecsfun_argmacrost_Example_Safe_fooB@
hs_bindgen_e49c2e985e471c99 :: Ptr B -> IO Unit
-- __unique:__ @test_bindingspecsfun_argmacrost_Example_Safe_fooB@
hs_bindgen_e49c2e985e471c99 = fromFFIType hs_bindgen_e49c2e985e471c99_base
{-| __C declaration:__ @fooB@

    __defined at:__ @binding-specs\/fun_arg\/macro\/struct.h 11:6@

    __exported by:__ @binding-specs\/fun_arg\/macro\/struct.h@
-}
fooB :: B -> IO Unit
{-| __C declaration:__ @fooB@

    __defined at:__ @binding-specs\/fun_arg\/macro\/struct.h 11:6@

    __exported by:__ @binding-specs\/fun_arg\/macro\/struct.h@
-}
fooB = \x_0 -> with x_0 (\x_1 -> hs_bindgen_e49c2e985e471c99 x_1)
-- __unique:__ @test_bindingspecsfun_argmacrost_Example_Unsafe_foo@
foreign import ccall unsafe "hs_bindgen_9dbeca9fa307eee9" hs_bindgen_9dbeca9fa307eee9_base ::
    Ptr Void
 -> IO Unit
-- __unique:__ @test_bindingspecsfun_argmacrost_Example_Unsafe_foo@
hs_bindgen_9dbeca9fa307eee9 :: Ptr MyStruct -> IO Unit
-- __unique:__ @test_bindingspecsfun_argmacrost_Example_Unsafe_foo@
hs_bindgen_9dbeca9fa307eee9 = fromFFIType hs_bindgen_9dbeca9fa307eee9_base
{-| __C declaration:__ @foo@

    __defined at:__ @binding-specs\/fun_arg\/macro\/struct.h 5:6@

    __exported by:__ @binding-specs\/fun_arg\/macro\/struct.h@
-}
foo :: MyStruct -> IO Unit
{-| __C declaration:__ @foo@

    __defined at:__ @binding-specs\/fun_arg\/macro\/struct.h 5:6@

    __exported by:__ @binding-specs\/fun_arg\/macro\/struct.h@
-}
foo = \x_0 -> with x_0 (\x_1 -> hs_bindgen_9dbeca9fa307eee9 x_1)
-- __unique:__ @test_bindingspecsfun_argmacrost_Example_Unsafe_fooA@
foreign import ccall unsafe "hs_bindgen_fb94ee6f22de1d89" hs_bindgen_fb94ee6f22de1d89_base ::
    Ptr Void
 -> IO Unit
-- __unique:__ @test_bindingspecsfun_argmacrost_Example_Unsafe_fooA@
hs_bindgen_fb94ee6f22de1d89 :: Ptr A -> IO Unit
-- __unique:__ @test_bindingspecsfun_argmacrost_Example_Unsafe_fooA@
hs_bindgen_fb94ee6f22de1d89 = fromFFIType hs_bindgen_fb94ee6f22de1d89_base
{-| __C declaration:__ @fooA@

    __defined at:__ @binding-specs\/fun_arg\/macro\/struct.h 10:6@

    __exported by:__ @binding-specs\/fun_arg\/macro\/struct.h@
-}
fooA :: A -> IO Unit
{-| __C declaration:__ @fooA@

    __defined at:__ @binding-specs\/fun_arg\/macro\/struct.h 10:6@

    __exported by:__ @binding-specs\/fun_arg\/macro\/struct.h@
-}
fooA = \x_0 -> with x_0 (\x_1 -> hs_bindgen_fb94ee6f22de1d89 x_1)
-- __unique:__ @test_bindingspecsfun_argmacrost_Example_Unsafe_fooB@
foreign import ccall unsafe "hs_bindgen_f8f83a7090687b7e" hs_bindgen_f8f83a7090687b7e_base ::
    Ptr Void
 -> IO Unit
-- __unique:__ @test_bindingspecsfun_argmacrost_Example_Unsafe_fooB@
hs_bindgen_f8f83a7090687b7e :: Ptr B -> IO Unit
-- __unique:__ @test_bindingspecsfun_argmacrost_Example_Unsafe_fooB@
hs_bindgen_f8f83a7090687b7e = fromFFIType hs_bindgen_f8f83a7090687b7e_base
{-| __C declaration:__ @fooB@

    __defined at:__ @binding-specs\/fun_arg\/macro\/struct.h 11:6@

    __exported by:__ @binding-specs\/fun_arg\/macro\/struct.h@
-}
fooB :: B -> IO Unit
{-| __C declaration:__ @fooB@

    __defined at:__ @binding-specs\/fun_arg\/macro\/struct.h 11:6@

    __exported by:__ @binding-specs\/fun_arg\/macro\/struct.h@
-}
fooB = \x_0 -> with x_0 (\x_1 -> hs_bindgen_f8f83a7090687b7e x_1)
-- __unique:__ @test_bindingspecsfun_argmacrost_Example_get_foo@
foreign import ccall unsafe "hs_bindgen_ccfc23165c7fd4a9" hs_bindgen_ccfc23165c7fd4a9_base ::
    IO (FunPtr Void)
-- __unique:__ @test_bindingspecsfun_argmacrost_Example_get_foo@
hs_bindgen_ccfc23165c7fd4a9 :: IO (FunPtr (MyStruct -> IO Unit))
-- __unique:__ @test_bindingspecsfun_argmacrost_Example_get_foo@
hs_bindgen_ccfc23165c7fd4a9 = fromFFIType hs_bindgen_ccfc23165c7fd4a9_base
{-# NOINLINE foo #-}
{-| __C declaration:__ @foo@

    __defined at:__ @binding-specs\/fun_arg\/macro\/struct.h 5:6@

    __exported by:__ @binding-specs\/fun_arg\/macro\/struct.h@
-}
foo :: FunPtr (MyStruct -> IO Unit)
{-| __C declaration:__ @foo@

    __defined at:__ @binding-specs\/fun_arg\/macro\/struct.h 5:6@

    __exported by:__ @binding-specs\/fun_arg\/macro\/struct.h@
-}
foo = unsafePerformIO hs_bindgen_ccfc23165c7fd4a9
-- __unique:__ @test_bindingspecsfun_argmacrost_Example_get_fooA@
foreign import ccall unsafe "hs_bindgen_ab74a4a30349b6b2" hs_bindgen_ab74a4a30349b6b2_base ::
    IO (FunPtr Void)
-- __unique:__ @test_bindingspecsfun_argmacrost_Example_get_fooA@
hs_bindgen_ab74a4a30349b6b2 :: IO (FunPtr (A -> IO Unit))
-- __unique:__ @test_bindingspecsfun_argmacrost_Example_get_fooA@
hs_bindgen_ab74a4a30349b6b2 = fromFFIType hs_bindgen_ab74a4a30349b6b2_base
{-# NOINLINE fooA #-}
{-| __C declaration:__ @fooA@

    __defined at:__ @binding-specs\/fun_arg\/macro\/struct.h 10:6@

    __exported by:__ @binding-specs\/fun_arg\/macro\/struct.h@
-}
fooA :: FunPtr (A -> IO Unit)
{-| __C declaration:__ @fooA@

    __defined at:__ @binding-specs\/fun_arg\/macro\/struct.h 10:6@

    __exported by:__ @binding-specs\/fun_arg\/macro\/struct.h@
-}
fooA = unsafePerformIO hs_bindgen_ab74a4a30349b6b2
-- __unique:__ @test_bindingspecsfun_argmacrost_Example_get_fooB@
foreign import ccall unsafe "hs_bindgen_19855bed49223360" hs_bindgen_19855bed49223360_base ::
    IO (FunPtr Void)
-- __unique:__ @test_bindingspecsfun_argmacrost_Example_get_fooB@
hs_bindgen_19855bed49223360 :: IO (FunPtr (B -> IO Unit))
-- __unique:__ @test_bindingspecsfun_argmacrost_Example_get_fooB@
hs_bindgen_19855bed49223360 = fromFFIType hs_bindgen_19855bed49223360_base
{-# NOINLINE fooB #-}
{-| __C declaration:__ @fooB@

    __defined at:__ @binding-specs\/fun_arg\/macro\/struct.h 11:6@

    __exported by:__ @binding-specs\/fun_arg\/macro\/struct.h@
-}
fooB :: FunPtr (B -> IO Unit)
{-| __C declaration:__ @fooB@

    __defined at:__ @binding-specs\/fun_arg\/macro\/struct.h 11:6@

    __exported by:__ @binding-specs\/fun_arg\/macro\/struct.h@
-}
fooB = unsafePerformIO hs_bindgen_19855bed49223360
