-- addDependentFile examples/golden/functions/decls_in_signature.h
-- #include <functions/decls_in_signature.h>
-- void hs_bindgen_920e5c20f770432b (
--   struct opaque *arg1,
--   struct outside *arg2,
--   struct outside *arg3
-- )
-- {
--   normal(arg1, arg2, *arg3);
-- }
-- void hs_bindgen_baea2c7a0c8b9965 (
--   struct named_struct *arg1
-- )
-- {
--   f1(*arg1);
-- }
-- void hs_bindgen_990d7be722ad5414 (
--   union named_union *arg1
-- )
-- {
--   f2(*arg1);
-- }
-- void hs_bindgen_247ee31a29b7e5a8 (
--   struct opaque *arg1,
--   struct outside *arg2,
--   struct outside *arg3
-- )
-- {
--   normal(arg1, arg2, *arg3);
-- }
-- void hs_bindgen_dad6e1aa83dec458 (
--   struct named_struct *arg1
-- )
-- {
--   f1(*arg1);
-- }
-- void hs_bindgen_e6bb0f3956383df9 (
--   union named_union *arg1
-- )
-- {
--   f2(*arg1);
-- }
-- /* test_functionsdecls_in_signature_Example_get_normal */
-- __attribute__ ((const))
-- void (*hs_bindgen_f3036965ea57b87f (void)) (
--   struct opaque *arg1,
--   struct outside *arg2,
--   struct outside arg3
-- )
-- {
--   return &normal;
-- }
-- /* test_functionsdecls_in_signature_Example_get_f1 */
-- __attribute__ ((const))
-- void (*hs_bindgen_86a0bd6e9f7eb005 (void)) (
--   struct named_struct arg1
-- )
-- {
--   return &f1;
-- }
-- /* test_functionsdecls_in_signature_Example_get_f2 */
-- __attribute__ ((const))
-- void (*hs_bindgen_4bb469a35be04698 (void)) (
--   union named_union arg1
-- )
-- {
--   return &f2;
-- }
{-| __C declaration:__ @struct opaque@

    __defined at:__ @functions\/decls_in_signature.h 2:8@

    __exported by:__ @functions\/decls_in_signature.h@
-}
data Opaque
{-| __C declaration:__ @struct outside@

    __defined at:__ @functions\/decls_in_signature.h 3:8@

    __exported by:__ @functions\/decls_in_signature.h@
-}
data Outside
    = Outside {outside_x :: CInt
               {- ^ __C declaration:__ @x@

                    __defined at:__ @functions\/decls_in_signature.h 4:7@

                    __exported by:__ @functions\/decls_in_signature.h@
               -},
               outside_y :: CInt
               {- ^ __C declaration:__ @y@

                    __defined at:__ @functions\/decls_in_signature.h 5:7@

                    __exported by:__ @functions\/decls_in_signature.h@
               -}}
      {- ^ __C declaration:__ @struct outside@

           __defined at:__ @functions\/decls_in_signature.h 3:8@

           __exported by:__ @functions\/decls_in_signature.h@
      -}
    deriving stock (Eq, Show)
instance StaticSize Outside
    where staticSizeOf = \_ -> 8 :: Int
          staticAlignment = \_ -> 4 :: Int
instance ReadRaw Outside
    where readRaw = \ptr_0 -> (pure Outside <*> readRaw (Proxy @"outside_x") ptr_0) <*> readRaw (Proxy @"outside_y") ptr_0
instance WriteRaw Outside
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       Outside outside_x_2
                                               outside_y_3 -> writeRaw (Proxy @"outside_x") ptr_0 outside_x_2 >> writeRaw (Proxy @"outside_y") ptr_0 outside_y_3
deriving via (EquivStorable Outside) instance Storable Outside
instance HasCField Outside "outside_x"
    where type CFieldType Outside "outside_x" = CInt
          offset# = \_ -> \_ -> 0
instance TyEq ty (CFieldType Outside "outside_x") =>
         HasField "outside_x" (Ptr Outside) (Ptr ty)
    where getField = fromPtr (Proxy @"outside_x")
instance HasCField Outside "outside_y"
    where type CFieldType Outside "outside_y" = CInt
          offset# = \_ -> \_ -> 4
instance TyEq ty (CFieldType Outside "outside_y") =>
         HasField "outside_y" (Ptr Outside) (Ptr ty)
    where getField = fromPtr (Proxy @"outside_y")
{-| Error cases

  See 'UnexpectedAnonInSignature' for discussion (of both these error cases and the edge cases below).

__C declaration:__ @struct named_struct@

__defined at:__ @functions\/decls_in_signature.h 17:16@

__exported by:__ @functions\/decls_in_signature.h@
-}
data Named_struct
    = Named_struct {named_struct_x :: CInt
                    {- ^ __C declaration:__ @x@

                         __defined at:__ @functions\/decls_in_signature.h 17:35@

                         __exported by:__ @functions\/decls_in_signature.h@
                    -},
                    named_struct_y :: CInt
                    {- ^ __C declaration:__ @y@

                         __defined at:__ @functions\/decls_in_signature.h 17:42@

                         __exported by:__ @functions\/decls_in_signature.h@
                    -}}
      {- ^ Error cases

         See 'UnexpectedAnonInSignature' for discussion (of both these error cases and the edge cases below).

      __C declaration:__ @struct named_struct@

      __defined at:__ @functions\/decls_in_signature.h 17:16@

      __exported by:__ @functions\/decls_in_signature.h@
      -}
    deriving stock (Eq, Show)
instance StaticSize Named_struct
    where staticSizeOf = \_ -> 8 :: Int
          staticAlignment = \_ -> 4 :: Int
instance ReadRaw Named_struct
    where readRaw = \ptr_0 -> (pure Named_struct <*> readRaw (Proxy @"named_struct_x") ptr_0) <*> readRaw (Proxy @"named_struct_y") ptr_0
instance WriteRaw Named_struct
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       Named_struct named_struct_x_2
                                                    named_struct_y_3 -> writeRaw (Proxy @"named_struct_x") ptr_0 named_struct_x_2 >> writeRaw (Proxy @"named_struct_y") ptr_0 named_struct_y_3
deriving via (EquivStorable Named_struct) instance Storable Named_struct
instance HasCField Named_struct "named_struct_x"
    where type CFieldType Named_struct "named_struct_x" = CInt
          offset# = \_ -> \_ -> 0
instance TyEq ty (CFieldType Named_struct "named_struct_x") =>
         HasField "named_struct_x" (Ptr Named_struct) (Ptr ty)
    where getField = fromPtr (Proxy @"named_struct_x")
instance HasCField Named_struct "named_struct_y"
    where type CFieldType Named_struct "named_struct_y" = CInt
          offset# = \_ -> \_ -> 4
instance TyEq ty (CFieldType Named_struct "named_struct_y") =>
         HasField "named_struct_y" (Ptr Named_struct) (Ptr ty)
    where getField = fromPtr (Proxy @"named_struct_y")
{-| __C declaration:__ @union named_union@

    __defined at:__ @functions\/decls_in_signature.h 20:15@

    __exported by:__ @functions\/decls_in_signature.h@
-}
newtype Named_union
    = Named_union {unwrapNamed_union :: ByteArray}
      {- ^ __C declaration:__ @union named_union@

           __defined at:__ @functions\/decls_in_signature.h 20:15@

           __exported by:__ @functions\/decls_in_signature.h@
      -}
deriving via (SizedByteArray 4 4) instance StaticSize Named_union
deriving via (SizedByteArray 4 4) instance ReadRaw Named_union
deriving via (SizedByteArray 4 4) instance WriteRaw Named_union
deriving via (EquivStorable Named_union) instance Storable Named_union
{-|

  __See:__ 'set_named_union_x'

__C declaration:__ @x@

__defined at:__ @functions\/decls_in_signature.h 20:33@

__exported by:__ @functions\/decls_in_signature.h@
-}
get_named_union_x :: Named_union -> CInt
{-|

  __See:__ 'set_named_union_x'

__C declaration:__ @x@

__defined at:__ @functions\/decls_in_signature.h 20:33@

__exported by:__ @functions\/decls_in_signature.h@
-}
get_named_union_x = getUnionPayload
{-|

  __See:__ 'get_named_union_x'

-}
set_named_union_x :: CInt -> Named_union
{-|

  __See:__ 'get_named_union_x'

-}
set_named_union_x = setUnionPayload
{-|

  __See:__ 'set_named_union_y'

__C declaration:__ @y@

__defined at:__ @functions\/decls_in_signature.h 20:41@

__exported by:__ @functions\/decls_in_signature.h@
-}
get_named_union_y :: Named_union -> CChar
{-|

  __See:__ 'set_named_union_y'

__C declaration:__ @y@

__defined at:__ @functions\/decls_in_signature.h 20:41@

__exported by:__ @functions\/decls_in_signature.h@
-}
get_named_union_y = getUnionPayload
{-|

  __See:__ 'get_named_union_y'

-}
set_named_union_y :: CChar -> Named_union
{-|

  __See:__ 'get_named_union_y'

-}
set_named_union_y = setUnionPayload
instance HasCField Named_union "named_union_x"
    where type CFieldType Named_union "named_union_x" = CInt
          offset# = \_ -> \_ -> 0
instance TyEq ty (CFieldType Named_union "named_union_x") =>
         HasField "named_union_x" (Ptr Named_union) (Ptr ty)
    where getField = fromPtr (Proxy @"named_union_x")
instance HasCField Named_union "named_union_y"
    where type CFieldType Named_union "named_union_y" = CChar
          offset# = \_ -> \_ -> 0
instance TyEq ty (CFieldType Named_union "named_union_y") =>
         HasField "named_union_y" (Ptr Named_union) (Ptr ty)
    where getField = fromPtr (Proxy @"named_union_y")
-- __unique:__ @test_functionsdecls_in_signature_Example_Safe_normal@
foreign import ccall safe "hs_bindgen_920e5c20f770432b" hs_bindgen_920e5c20f770432b_base ::
    Ptr Void
 -> Ptr Void
 -> Ptr Void
 -> IO Unit
-- __unique:__ @test_functionsdecls_in_signature_Example_Safe_normal@
hs_bindgen_920e5c20f770432b :: Ptr Opaque ->
                               Ptr Outside -> Ptr Outside -> IO Unit
-- __unique:__ @test_functionsdecls_in_signature_Example_Safe_normal@
hs_bindgen_920e5c20f770432b = fromFFIType hs_bindgen_920e5c20f770432b_base
{-| __C declaration:__ @normal@

    __defined at:__ @functions\/decls_in_signature.h 7:6@

    __exported by:__ @functions\/decls_in_signature.h@
-}
normal :: Ptr Opaque -> Ptr Outside -> Outside -> IO Unit
{-| __C declaration:__ @normal@

    __defined at:__ @functions\/decls_in_signature.h 7:6@

    __exported by:__ @functions\/decls_in_signature.h@
-}
normal = \ptr_to_opaque_0 -> \ptr_to_defined_1 -> \by_value_2 -> with by_value_2 (\by_value_3 -> hs_bindgen_920e5c20f770432b ptr_to_opaque_0 ptr_to_defined_1 by_value_3)
-- __unique:__ @test_functionsdecls_in_signature_Example_Safe_f1@
foreign import ccall safe "hs_bindgen_baea2c7a0c8b9965" hs_bindgen_baea2c7a0c8b9965_base ::
    Ptr Void
 -> IO Unit
-- __unique:__ @test_functionsdecls_in_signature_Example_Safe_f1@
hs_bindgen_baea2c7a0c8b9965 :: Ptr Named_struct -> IO Unit
-- __unique:__ @test_functionsdecls_in_signature_Example_Safe_f1@
hs_bindgen_baea2c7a0c8b9965 = fromFFIType hs_bindgen_baea2c7a0c8b9965_base
{-| Error cases

  See 'UnexpectedAnonInSignature' for discussion (of both these error cases and the edge cases below).

__C declaration:__ @f1@

__defined at:__ @functions\/decls_in_signature.h 17:6@

__exported by:__ @functions\/decls_in_signature.h@
-}
f1 :: Named_struct -> IO Unit
{-| Error cases

  See 'UnexpectedAnonInSignature' for discussion (of both these error cases and the edge cases below).

__C declaration:__ @f1@

__defined at:__ @functions\/decls_in_signature.h 17:6@

__exported by:__ @functions\/decls_in_signature.h@
-}
f1 = \arg_0 -> with arg_0 (\arg_1 -> hs_bindgen_baea2c7a0c8b9965 arg_1)
-- __unique:__ @test_functionsdecls_in_signature_Example_Safe_f2@
foreign import ccall safe "hs_bindgen_990d7be722ad5414" hs_bindgen_990d7be722ad5414_base ::
    Ptr Void
 -> IO Unit
-- __unique:__ @test_functionsdecls_in_signature_Example_Safe_f2@
hs_bindgen_990d7be722ad5414 :: Ptr Named_union -> IO Unit
-- __unique:__ @test_functionsdecls_in_signature_Example_Safe_f2@
hs_bindgen_990d7be722ad5414 = fromFFIType hs_bindgen_990d7be722ad5414_base
{-| __C declaration:__ @f2@

    __defined at:__ @functions\/decls_in_signature.h 20:6@

    __exported by:__ @functions\/decls_in_signature.h@
-}
f2 :: Named_union -> IO Unit
{-| __C declaration:__ @f2@

    __defined at:__ @functions\/decls_in_signature.h 20:6@

    __exported by:__ @functions\/decls_in_signature.h@
-}
f2 = \arg_0 -> with arg_0 (\arg_1 -> hs_bindgen_990d7be722ad5414 arg_1)
-- __unique:__ @test_functionsdecls_in_signature_Example_Unsafe_normal@
foreign import ccall unsafe "hs_bindgen_247ee31a29b7e5a8" hs_bindgen_247ee31a29b7e5a8_base ::
    Ptr Void
 -> Ptr Void
 -> Ptr Void
 -> IO Unit
-- __unique:__ @test_functionsdecls_in_signature_Example_Unsafe_normal@
hs_bindgen_247ee31a29b7e5a8 :: Ptr Opaque ->
                               Ptr Outside -> Ptr Outside -> IO Unit
-- __unique:__ @test_functionsdecls_in_signature_Example_Unsafe_normal@
hs_bindgen_247ee31a29b7e5a8 = fromFFIType hs_bindgen_247ee31a29b7e5a8_base
{-| __C declaration:__ @normal@

    __defined at:__ @functions\/decls_in_signature.h 7:6@

    __exported by:__ @functions\/decls_in_signature.h@
-}
normal :: Ptr Opaque -> Ptr Outside -> Outside -> IO Unit
{-| __C declaration:__ @normal@

    __defined at:__ @functions\/decls_in_signature.h 7:6@

    __exported by:__ @functions\/decls_in_signature.h@
-}
normal = \ptr_to_opaque_0 -> \ptr_to_defined_1 -> \by_value_2 -> with by_value_2 (\by_value_3 -> hs_bindgen_247ee31a29b7e5a8 ptr_to_opaque_0 ptr_to_defined_1 by_value_3)
-- __unique:__ @test_functionsdecls_in_signature_Example_Unsafe_f1@
foreign import ccall unsafe "hs_bindgen_dad6e1aa83dec458" hs_bindgen_dad6e1aa83dec458_base ::
    Ptr Void
 -> IO Unit
-- __unique:__ @test_functionsdecls_in_signature_Example_Unsafe_f1@
hs_bindgen_dad6e1aa83dec458 :: Ptr Named_struct -> IO Unit
-- __unique:__ @test_functionsdecls_in_signature_Example_Unsafe_f1@
hs_bindgen_dad6e1aa83dec458 = fromFFIType hs_bindgen_dad6e1aa83dec458_base
{-| Error cases

  See 'UnexpectedAnonInSignature' for discussion (of both these error cases and the edge cases below).

__C declaration:__ @f1@

__defined at:__ @functions\/decls_in_signature.h 17:6@

__exported by:__ @functions\/decls_in_signature.h@
-}
f1 :: Named_struct -> IO Unit
{-| Error cases

  See 'UnexpectedAnonInSignature' for discussion (of both these error cases and the edge cases below).

__C declaration:__ @f1@

__defined at:__ @functions\/decls_in_signature.h 17:6@

__exported by:__ @functions\/decls_in_signature.h@
-}
f1 = \arg_0 -> with arg_0 (\arg_1 -> hs_bindgen_dad6e1aa83dec458 arg_1)
-- __unique:__ @test_functionsdecls_in_signature_Example_Unsafe_f2@
foreign import ccall unsafe "hs_bindgen_e6bb0f3956383df9" hs_bindgen_e6bb0f3956383df9_base ::
    Ptr Void
 -> IO Unit
-- __unique:__ @test_functionsdecls_in_signature_Example_Unsafe_f2@
hs_bindgen_e6bb0f3956383df9 :: Ptr Named_union -> IO Unit
-- __unique:__ @test_functionsdecls_in_signature_Example_Unsafe_f2@
hs_bindgen_e6bb0f3956383df9 = fromFFIType hs_bindgen_e6bb0f3956383df9_base
{-| __C declaration:__ @f2@

    __defined at:__ @functions\/decls_in_signature.h 20:6@

    __exported by:__ @functions\/decls_in_signature.h@
-}
f2 :: Named_union -> IO Unit
{-| __C declaration:__ @f2@

    __defined at:__ @functions\/decls_in_signature.h 20:6@

    __exported by:__ @functions\/decls_in_signature.h@
-}
f2 = \arg_0 -> with arg_0 (\arg_1 -> hs_bindgen_e6bb0f3956383df9 arg_1)
-- __unique:__ @test_functionsdecls_in_signature_Example_get_normal@
foreign import ccall unsafe "hs_bindgen_f3036965ea57b87f" hs_bindgen_f3036965ea57b87f_base ::
    IO (FunPtr Void)
-- __unique:__ @test_functionsdecls_in_signature_Example_get_normal@
hs_bindgen_f3036965ea57b87f :: IO (FunPtr (Ptr Opaque ->
                                           Ptr Outside -> Outside -> IO Unit))
-- __unique:__ @test_functionsdecls_in_signature_Example_get_normal@
hs_bindgen_f3036965ea57b87f = fromFFIType hs_bindgen_f3036965ea57b87f_base
{-# NOINLINE normal #-}
{-| __C declaration:__ @normal@

    __defined at:__ @functions\/decls_in_signature.h 7:6@

    __exported by:__ @functions\/decls_in_signature.h@
-}
normal :: FunPtr (Ptr Opaque -> Ptr Outside -> Outside -> IO Unit)
{-| __C declaration:__ @normal@

    __defined at:__ @functions\/decls_in_signature.h 7:6@

    __exported by:__ @functions\/decls_in_signature.h@
-}
normal = unsafePerformIO hs_bindgen_f3036965ea57b87f
-- __unique:__ @test_functionsdecls_in_signature_Example_get_f1@
foreign import ccall unsafe "hs_bindgen_86a0bd6e9f7eb005" hs_bindgen_86a0bd6e9f7eb005_base ::
    IO (FunPtr Void)
-- __unique:__ @test_functionsdecls_in_signature_Example_get_f1@
hs_bindgen_86a0bd6e9f7eb005 :: IO (FunPtr (Named_struct ->
                                           IO Unit))
-- __unique:__ @test_functionsdecls_in_signature_Example_get_f1@
hs_bindgen_86a0bd6e9f7eb005 = fromFFIType hs_bindgen_86a0bd6e9f7eb005_base
{-# NOINLINE f1 #-}
{-| Error cases

  See 'UnexpectedAnonInSignature' for discussion (of both these error cases and the edge cases below).

__C declaration:__ @f1@

__defined at:__ @functions\/decls_in_signature.h 17:6@

__exported by:__ @functions\/decls_in_signature.h@
-}
f1 :: FunPtr (Named_struct -> IO Unit)
{-| Error cases

  See 'UnexpectedAnonInSignature' for discussion (of both these error cases and the edge cases below).

__C declaration:__ @f1@

__defined at:__ @functions\/decls_in_signature.h 17:6@

__exported by:__ @functions\/decls_in_signature.h@
-}
f1 = unsafePerformIO hs_bindgen_86a0bd6e9f7eb005
-- __unique:__ @test_functionsdecls_in_signature_Example_get_f2@
foreign import ccall unsafe "hs_bindgen_4bb469a35be04698" hs_bindgen_4bb469a35be04698_base ::
    IO (FunPtr Void)
-- __unique:__ @test_functionsdecls_in_signature_Example_get_f2@
hs_bindgen_4bb469a35be04698 :: IO (FunPtr (Named_union -> IO Unit))
-- __unique:__ @test_functionsdecls_in_signature_Example_get_f2@
hs_bindgen_4bb469a35be04698 = fromFFIType hs_bindgen_4bb469a35be04698_base
{-# NOINLINE f2 #-}
{-| __C declaration:__ @f2@

    __defined at:__ @functions\/decls_in_signature.h 20:6@

    __exported by:__ @functions\/decls_in_signature.h@
-}
f2 :: FunPtr (Named_union -> IO Unit)
{-| __C declaration:__ @f2@

    __defined at:__ @functions\/decls_in_signature.h 20:6@

    __exported by:__ @functions\/decls_in_signature.h@
-}
f2 = unsafePerformIO hs_bindgen_4bb469a35be04698
