-- addDependentFile examples/golden/edge-cases/anon_multiple_typedefs.h
-- #include <edge-cases/anon_multiple_typedefs.h>
-- void hs_bindgen_c97a0d4458699ad7 (
--   point2a *arg1,
--   point2b arg2
-- )
-- {
--   test(*arg1, arg2);
-- }
-- void hs_bindgen_f90e97b8d269be4e (
--   point2a *arg1,
--   point2b arg2
-- )
-- {
--   test(*arg1, arg2);
-- }
-- /* test_edgecasesanon_multiple_typed_Example_get_test */
-- __attribute__ ((const))
-- void (*hs_bindgen_8361517d92bfbc76 (void)) (
--   point2a arg1,
--   point2b arg2
-- )
-- {
--   return &test;
-- }
{-| __C declaration:__ @struct point1a@

    __defined at:__ @edge-cases\/anon_multiple_typedefs.h 5:9@

    __exported by:__ @edge-cases\/anon_multiple_typedefs.h@
-}
data Point1a
    = Point1a {point1a_x :: CInt
               {- ^ __C declaration:__ @x@

                    __defined at:__ @edge-cases\/anon_multiple_typedefs.h 5:22@

                    __exported by:__ @edge-cases\/anon_multiple_typedefs.h@
               -},
               point1a_y :: CInt
               {- ^ __C declaration:__ @y@

                    __defined at:__ @edge-cases\/anon_multiple_typedefs.h 5:29@

                    __exported by:__ @edge-cases\/anon_multiple_typedefs.h@
               -}}
      {- ^ __C declaration:__ @struct point1a@

           __defined at:__ @edge-cases\/anon_multiple_typedefs.h 5:9@

           __exported by:__ @edge-cases\/anon_multiple_typedefs.h@
      -}
    deriving stock (Eq, Show)
instance StaticSize Point1a
    where staticSizeOf = \_ -> 8 :: Int
          staticAlignment = \_ -> 4 :: Int
instance ReadRaw Point1a
    where readRaw = \ptr_0 -> (pure Point1a <*> readRaw (Proxy @"point1a_x") ptr_0) <*> readRaw (Proxy @"point1a_y") ptr_0
instance WriteRaw Point1a
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       Point1a point1a_x_2
                                               point1a_y_3 -> writeRaw (Proxy @"point1a_x") ptr_0 point1a_x_2 >> writeRaw (Proxy @"point1a_y") ptr_0 point1a_y_3
deriving via (EquivStorable Point1a) instance Storable Point1a
instance HasCField Point1a "point1a_x"
    where type CFieldType Point1a "point1a_x" = CInt
          offset# = \_ -> \_ -> 0
instance TyEq ty (CFieldType Point1a "point1a_x") =>
         HasField "point1a_x" (Ptr Point1a) (Ptr ty)
    where getField = fromPtr (Proxy @"point1a_x")
instance HasCField Point1a "point1a_y"
    where type CFieldType Point1a "point1a_y" = CInt
          offset# = \_ -> \_ -> 4
instance TyEq ty (CFieldType Point1a "point1a_y") =>
         HasField "point1a_y" (Ptr Point1a) (Ptr ty)
    where getField = fromPtr (Proxy @"point1a_y")
{-| __C declaration:__ @point1b@

    __defined at:__ @edge-cases\/anon_multiple_typedefs.h 5:43@

    __exported by:__ @edge-cases\/anon_multiple_typedefs.h@
-}
newtype Point1b
    = Point1b {unwrapPoint1b :: Point1a}
      {- ^ __C declaration:__ @point1b@

           __defined at:__ @edge-cases\/anon_multiple_typedefs.h 5:43@

           __exported by:__ @edge-cases\/anon_multiple_typedefs.h@
      -}
    deriving stock (Eq, Show)
    deriving newtype (StaticSize, ReadRaw, WriteRaw, Storable)
instance TyEq ty (CFieldType Point1b "unwrapPoint1b") =>
         HasField "unwrapPoint1b" (Ptr Point1b) (Ptr ty)
    where getField = fromPtr (Proxy @"unwrapPoint1b")
instance HasCField Point1b "unwrapPoint1b"
    where type CFieldType Point1b "unwrapPoint1b" = Point1a
          offset# = \_ -> \_ -> 0
{-| __C declaration:__ @struct point2a@

    __defined at:__ @edge-cases\/anon_multiple_typedefs.h 8:9@

    __exported by:__ @edge-cases\/anon_multiple_typedefs.h@
-}
data Point2a
    = Point2a {point2a_x :: CInt
               {- ^ __C declaration:__ @x@

                    __defined at:__ @edge-cases\/anon_multiple_typedefs.h 8:22@

                    __exported by:__ @edge-cases\/anon_multiple_typedefs.h@
               -},
               point2a_y :: CInt
               {- ^ __C declaration:__ @y@

                    __defined at:__ @edge-cases\/anon_multiple_typedefs.h 8:29@

                    __exported by:__ @edge-cases\/anon_multiple_typedefs.h@
               -}}
      {- ^ __C declaration:__ @struct point2a@

           __defined at:__ @edge-cases\/anon_multiple_typedefs.h 8:9@

           __exported by:__ @edge-cases\/anon_multiple_typedefs.h@
      -}
    deriving stock (Eq, Show)
instance StaticSize Point2a
    where staticSizeOf = \_ -> 8 :: Int
          staticAlignment = \_ -> 4 :: Int
instance ReadRaw Point2a
    where readRaw = \ptr_0 -> (pure Point2a <*> readRaw (Proxy @"point2a_x") ptr_0) <*> readRaw (Proxy @"point2a_y") ptr_0
instance WriteRaw Point2a
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       Point2a point2a_x_2
                                               point2a_y_3 -> writeRaw (Proxy @"point2a_x") ptr_0 point2a_x_2 >> writeRaw (Proxy @"point2a_y") ptr_0 point2a_y_3
deriving via (EquivStorable Point2a) instance Storable Point2a
instance HasCField Point2a "point2a_x"
    where type CFieldType Point2a "point2a_x" = CInt
          offset# = \_ -> \_ -> 0
instance TyEq ty (CFieldType Point2a "point2a_x") =>
         HasField "point2a_x" (Ptr Point2a) (Ptr ty)
    where getField = fromPtr (Proxy @"point2a_x")
instance HasCField Point2a "point2a_y"
    where type CFieldType Point2a "point2a_y" = CInt
          offset# = \_ -> \_ -> 4
instance TyEq ty (CFieldType Point2a "point2a_y") =>
         HasField "point2a_y" (Ptr Point2a) (Ptr ty)
    where getField = fromPtr (Proxy @"point2a_y")
{-| __C declaration:__ @point2b@

    __defined at:__ @edge-cases\/anon_multiple_typedefs.h 8:44@

    __exported by:__ @edge-cases\/anon_multiple_typedefs.h@
-}
newtype Point2b
    = Point2b {unwrapPoint2b :: (Ptr Point2a)}
      {- ^ __C declaration:__ @point2b@

           __defined at:__ @edge-cases\/anon_multiple_typedefs.h 8:44@

           __exported by:__ @edge-cases\/anon_multiple_typedefs.h@
      -}
    deriving stock (Eq, Ord, Show)
    deriving newtype (StaticSize,
                      ReadRaw,
                      WriteRaw,
                      Storable,
                      HasFFIType)
instance TyEq ty (CFieldType Point2b "unwrapPoint2b") =>
         HasField "unwrapPoint2b" (Ptr Point2b) (Ptr ty)
    where getField = fromPtr (Proxy @"unwrapPoint2b")
instance HasCField Point2b "unwrapPoint2b"
    where type CFieldType Point2b "unwrapPoint2b" = Ptr Point2a
          offset# = \_ -> \_ -> 0
{-| __C declaration:__ @struct \@point3a_Aux@

    __defined at:__ @edge-cases\/anon_multiple_typedefs.h 11:9@

    __exported by:__ @edge-cases\/anon_multiple_typedefs.h@
-}
data Point3a_Aux
    = Point3a_Aux {point3a_Aux_x :: CInt
                   {- ^ __C declaration:__ @x@

                        __defined at:__ @edge-cases\/anon_multiple_typedefs.h 11:22@

                        __exported by:__ @edge-cases\/anon_multiple_typedefs.h@
                   -},
                   point3a_Aux_y :: CInt
                   {- ^ __C declaration:__ @y@

                        __defined at:__ @edge-cases\/anon_multiple_typedefs.h 11:29@

                        __exported by:__ @edge-cases\/anon_multiple_typedefs.h@
                   -}}
      {- ^ __C declaration:__ @struct \@point3a_Aux@

           __defined at:__ @edge-cases\/anon_multiple_typedefs.h 11:9@

           __exported by:__ @edge-cases\/anon_multiple_typedefs.h@
      -}
    deriving stock (Eq, Show)
instance StaticSize Point3a_Aux
    where staticSizeOf = \_ -> 8 :: Int
          staticAlignment = \_ -> 4 :: Int
instance ReadRaw Point3a_Aux
    where readRaw = \ptr_0 -> (pure Point3a_Aux <*> readRaw (Proxy @"point3a_Aux_x") ptr_0) <*> readRaw (Proxy @"point3a_Aux_y") ptr_0
instance WriteRaw Point3a_Aux
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       Point3a_Aux point3a_Aux_x_2
                                                   point3a_Aux_y_3 -> writeRaw (Proxy @"point3a_Aux_x") ptr_0 point3a_Aux_x_2 >> writeRaw (Proxy @"point3a_Aux_y") ptr_0 point3a_Aux_y_3
deriving via (EquivStorable Point3a_Aux) instance Storable Point3a_Aux
instance HasCField Point3a_Aux "point3a_Aux_x"
    where type CFieldType Point3a_Aux "point3a_Aux_x" = CInt
          offset# = \_ -> \_ -> 0
instance TyEq ty (CFieldType Point3a_Aux "point3a_Aux_x") =>
         HasField "point3a_Aux_x" (Ptr Point3a_Aux) (Ptr ty)
    where getField = fromPtr (Proxy @"point3a_Aux_x")
instance HasCField Point3a_Aux "point3a_Aux_y"
    where type CFieldType Point3a_Aux "point3a_Aux_y" = CInt
          offset# = \_ -> \_ -> 4
instance TyEq ty (CFieldType Point3a_Aux "point3a_Aux_y") =>
         HasField "point3a_Aux_y" (Ptr Point3a_Aux) (Ptr ty)
    where getField = fromPtr (Proxy @"point3a_Aux_y")
{-| __C declaration:__ @point3a@

    __defined at:__ @edge-cases\/anon_multiple_typedefs.h 11:35@

    __exported by:__ @edge-cases\/anon_multiple_typedefs.h@
-}
newtype Point3a
    = Point3a {unwrapPoint3a :: (Ptr Point3a_Aux)}
      {- ^ __C declaration:__ @point3a@

           __defined at:__ @edge-cases\/anon_multiple_typedefs.h 11:35@

           __exported by:__ @edge-cases\/anon_multiple_typedefs.h@
      -}
    deriving stock (Eq, Ord, Show)
    deriving newtype (StaticSize,
                      ReadRaw,
                      WriteRaw,
                      Storable,
                      HasFFIType)
instance TyEq ty (CFieldType Point3a "unwrapPoint3a") =>
         HasField "unwrapPoint3a" (Ptr Point3a) (Ptr ty)
    where getField = fromPtr (Proxy @"unwrapPoint3a")
instance HasCField Point3a "unwrapPoint3a"
    where type CFieldType Point3a "unwrapPoint3a" = Ptr Point3a_Aux
          offset# = \_ -> \_ -> 0
{-| __C declaration:__ @point3b@

    __defined at:__ @edge-cases\/anon_multiple_typedefs.h 11:45@

    __exported by:__ @edge-cases\/anon_multiple_typedefs.h@
-}
newtype Point3b
    = Point3b {unwrapPoint3b :: (Ptr Point3a_Aux)}
      {- ^ __C declaration:__ @point3b@

           __defined at:__ @edge-cases\/anon_multiple_typedefs.h 11:45@

           __exported by:__ @edge-cases\/anon_multiple_typedefs.h@
      -}
    deriving stock (Eq, Ord, Show)
    deriving newtype (StaticSize,
                      ReadRaw,
                      WriteRaw,
                      Storable,
                      HasFFIType)
instance TyEq ty (CFieldType Point3b "unwrapPoint3b") =>
         HasField "unwrapPoint3b" (Ptr Point3b) (Ptr ty)
    where getField = fromPtr (Proxy @"unwrapPoint3b")
instance HasCField Point3b "unwrapPoint3b"
    where type CFieldType Point3b "unwrapPoint3b" = Ptr Point3a_Aux
          offset# = \_ -> \_ -> 0
-- __unique:__ @test_edgecasesanon_multiple_typed_Example_Safe_test@
foreign import ccall safe "hs_bindgen_c97a0d4458699ad7" hs_bindgen_c97a0d4458699ad7_base ::
    Ptr Void
 -> Ptr Void
 -> IO Unit
-- __unique:__ @test_edgecasesanon_multiple_typed_Example_Safe_test@
hs_bindgen_c97a0d4458699ad7 :: Ptr Point2a -> Point2b -> IO Unit
-- __unique:__ @test_edgecasesanon_multiple_typed_Example_Safe_test@
hs_bindgen_c97a0d4458699ad7 = fromFFIType hs_bindgen_c97a0d4458699ad7_base
{-| __C declaration:__ @test@

    __defined at:__ @edge-cases\/anon_multiple_typedefs.h 14:6@

    __exported by:__ @edge-cases\/anon_multiple_typedefs.h@
-}
test :: Point2a -> Point2b -> IO Unit
{-| __C declaration:__ @test@

    __defined at:__ @edge-cases\/anon_multiple_typedefs.h 14:6@

    __exported by:__ @edge-cases\/anon_multiple_typedefs.h@
-}
test = \x_0 -> \y_1 -> with x_0 (\x_2 -> hs_bindgen_c97a0d4458699ad7 x_2 y_1)
-- __unique:__ @test_edgecasesanon_multiple_typed_Example_Unsafe_test@
foreign import ccall unsafe "hs_bindgen_f90e97b8d269be4e" hs_bindgen_f90e97b8d269be4e_base ::
    Ptr Void
 -> Ptr Void
 -> IO Unit
-- __unique:__ @test_edgecasesanon_multiple_typed_Example_Unsafe_test@
hs_bindgen_f90e97b8d269be4e :: Ptr Point2a -> Point2b -> IO Unit
-- __unique:__ @test_edgecasesanon_multiple_typed_Example_Unsafe_test@
hs_bindgen_f90e97b8d269be4e = fromFFIType hs_bindgen_f90e97b8d269be4e_base
{-| __C declaration:__ @test@

    __defined at:__ @edge-cases\/anon_multiple_typedefs.h 14:6@

    __exported by:__ @edge-cases\/anon_multiple_typedefs.h@
-}
test :: Point2a -> Point2b -> IO Unit
{-| __C declaration:__ @test@

    __defined at:__ @edge-cases\/anon_multiple_typedefs.h 14:6@

    __exported by:__ @edge-cases\/anon_multiple_typedefs.h@
-}
test = \x_0 -> \y_1 -> with x_0 (\x_2 -> hs_bindgen_f90e97b8d269be4e x_2 y_1)
-- __unique:__ @test_edgecasesanon_multiple_typed_Example_get_test@
foreign import ccall unsafe "hs_bindgen_8361517d92bfbc76" hs_bindgen_8361517d92bfbc76_base ::
    IO (FunPtr Void)
-- __unique:__ @test_edgecasesanon_multiple_typed_Example_get_test@
hs_bindgen_8361517d92bfbc76 :: IO (FunPtr (Point2a ->
                                           Point2b -> IO Unit))
-- __unique:__ @test_edgecasesanon_multiple_typed_Example_get_test@
hs_bindgen_8361517d92bfbc76 = fromFFIType hs_bindgen_8361517d92bfbc76_base
{-# NOINLINE test #-}
{-| __C declaration:__ @test@

    __defined at:__ @edge-cases\/anon_multiple_typedefs.h 14:6@

    __exported by:__ @edge-cases\/anon_multiple_typedefs.h@
-}
test :: FunPtr (Point2a -> Point2b -> IO Unit)
{-| __C declaration:__ @test@

    __defined at:__ @edge-cases\/anon_multiple_typedefs.h 14:6@

    __exported by:__ @edge-cases\/anon_multiple_typedefs.h@
-}
test = unsafePerformIO hs_bindgen_8361517d92bfbc76
