-- addDependentFile examples/golden/types/complex/vector_test.h
-- #include <types/complex/vector_test.h>
-- vector *hs_bindgen_cd5f566bc96dcba0 (
--   double arg1,
--   double arg2
-- )
-- {
--   return new_vector(arg1, arg2);
-- }
-- vector *hs_bindgen_1af353788955c7a2 (
--   double arg1,
--   double arg2
-- )
-- {
--   return new_vector(arg1, arg2);
-- }
-- /* test_typescomplexvector_test_Example_get_new_vector */
-- __attribute__ ((const))
-- vector *(*hs_bindgen_cb36cf0957839e33 (void)) (
--   double arg1,
--   double arg2
-- )
-- {
--   return &new_vector;
-- }
{-| __C declaration:__ @struct vector@

    __defined at:__ @types\/complex\/vector_test.h 1:9@

    __exported by:__ @types\/complex\/vector_test.h@
-}
data Vector
    = Vector {vector_x :: CDouble
              {- ^ __C declaration:__ @x@

                   __defined at:__ @types\/complex\/vector_test.h 2:12@

                   __exported by:__ @types\/complex\/vector_test.h@
              -},
              vector_y :: CDouble
              {- ^ __C declaration:__ @y@

                   __defined at:__ @types\/complex\/vector_test.h 3:12@

                   __exported by:__ @types\/complex\/vector_test.h@
              -}}
      {- ^ __C declaration:__ @struct vector@

           __defined at:__ @types\/complex\/vector_test.h 1:9@

           __exported by:__ @types\/complex\/vector_test.h@
      -}
    deriving stock (Eq, Show)
instance StaticSize Vector
    where staticSizeOf = \_ -> 16 :: Int
          staticAlignment = \_ -> 8 :: Int
instance ReadRaw Vector
    where readRaw = \ptr_0 -> (pure Vector <*> readRaw (Proxy @"vector_x") ptr_0) <*> readRaw (Proxy @"vector_y") ptr_0
instance WriteRaw Vector
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       Vector vector_x_2
                                              vector_y_3 -> writeRaw (Proxy @"vector_x") ptr_0 vector_x_2 >> writeRaw (Proxy @"vector_y") ptr_0 vector_y_3
deriving via (EquivStorable Vector) instance Storable Vector
instance HasCField Vector "vector_x"
    where type CFieldType Vector "vector_x" = CDouble
          offset# = \_ -> \_ -> 0
instance TyEq ty (CFieldType Vector "vector_x") =>
         HasField "vector_x" (Ptr Vector) (Ptr ty)
    where getField = fromPtr (Proxy @"vector_x")
instance HasCField Vector "vector_y"
    where type CFieldType Vector "vector_y" = CDouble
          offset# = \_ -> \_ -> 8
instance TyEq ty (CFieldType Vector "vector_y") =>
         HasField "vector_y" (Ptr Vector) (Ptr ty)
    where getField = fromPtr (Proxy @"vector_y")
-- __unique:__ @test_typescomplexvector_test_Example_Safe_new_vector@
foreign import ccall safe "hs_bindgen_cd5f566bc96dcba0" hs_bindgen_cd5f566bc96dcba0_base ::
    Double
 -> Double
 -> IO (Ptr Void)
-- __unique:__ @test_typescomplexvector_test_Example_Safe_new_vector@
hs_bindgen_cd5f566bc96dcba0 :: CDouble ->
                               CDouble -> IO (Ptr Vector)
-- __unique:__ @test_typescomplexvector_test_Example_Safe_new_vector@
hs_bindgen_cd5f566bc96dcba0 = fromFFIType hs_bindgen_cd5f566bc96dcba0_base
{-| __C declaration:__ @new_vector@

    __defined at:__ @types\/complex\/vector_test.h 6:9@

    __exported by:__ @types\/complex\/vector_test.h@
-}
new_vector :: CDouble -> CDouble -> IO (Ptr Vector)
{-| __C declaration:__ @new_vector@

    __defined at:__ @types\/complex\/vector_test.h 6:9@

    __exported by:__ @types\/complex\/vector_test.h@
-}
new_vector = hs_bindgen_cd5f566bc96dcba0
-- __unique:__ @test_typescomplexvector_test_Example_Unsafe_new_vector@
foreign import ccall unsafe "hs_bindgen_1af353788955c7a2" hs_bindgen_1af353788955c7a2_base ::
    Double
 -> Double
 -> IO (Ptr Void)
-- __unique:__ @test_typescomplexvector_test_Example_Unsafe_new_vector@
hs_bindgen_1af353788955c7a2 :: CDouble ->
                               CDouble -> IO (Ptr Vector)
-- __unique:__ @test_typescomplexvector_test_Example_Unsafe_new_vector@
hs_bindgen_1af353788955c7a2 = fromFFIType hs_bindgen_1af353788955c7a2_base
{-| __C declaration:__ @new_vector@

    __defined at:__ @types\/complex\/vector_test.h 6:9@

    __exported by:__ @types\/complex\/vector_test.h@
-}
new_vector :: CDouble -> CDouble -> IO (Ptr Vector)
{-| __C declaration:__ @new_vector@

    __defined at:__ @types\/complex\/vector_test.h 6:9@

    __exported by:__ @types\/complex\/vector_test.h@
-}
new_vector = hs_bindgen_1af353788955c7a2
-- __unique:__ @test_typescomplexvector_test_Example_get_new_vector@
foreign import ccall unsafe "hs_bindgen_cb36cf0957839e33" hs_bindgen_cb36cf0957839e33_base ::
    IO (FunPtr Void)
-- __unique:__ @test_typescomplexvector_test_Example_get_new_vector@
hs_bindgen_cb36cf0957839e33 :: IO (FunPtr (CDouble ->
                                           CDouble -> IO (Ptr Vector)))
-- __unique:__ @test_typescomplexvector_test_Example_get_new_vector@
hs_bindgen_cb36cf0957839e33 = fromFFIType hs_bindgen_cb36cf0957839e33_base
{-# NOINLINE new_vector #-}
{-| __C declaration:__ @new_vector@

    __defined at:__ @types\/complex\/vector_test.h 6:9@

    __exported by:__ @types\/complex\/vector_test.h@
-}
new_vector :: FunPtr (CDouble -> CDouble -> IO (Ptr Vector))
{-| __C declaration:__ @new_vector@

    __defined at:__ @types\/complex\/vector_test.h 6:9@

    __exported by:__ @types\/complex\/vector_test.h@
-}
new_vector = unsafePerformIO hs_bindgen_cb36cf0957839e33
