-- addDependentFile examples/golden/binding-specs/name/squash_struct.h
{-| __C declaration:__ @struct foo@

    __defined at:__ @binding-specs\/name\/squash_struct.h 1:16@

    __exported by:__ @binding-specs\/name\/squash_struct.h@
-}
data Hoge
    = Hoge {hoge_x :: CInt
            {- ^ __C declaration:__ @x@

                 __defined at:__ @binding-specs\/name\/squash_struct.h 1:26@

                 __exported by:__ @binding-specs\/name\/squash_struct.h@
            -},
            hoge_y :: CInt
            {- ^ __C declaration:__ @y@

                 __defined at:__ @binding-specs\/name\/squash_struct.h 1:29@

                 __exported by:__ @binding-specs\/name\/squash_struct.h@
            -}}
      {- ^ __C declaration:__ @struct foo@

           __defined at:__ @binding-specs\/name\/squash_struct.h 1:16@

           __exported by:__ @binding-specs\/name\/squash_struct.h@
      -}
    deriving stock (Eq, Show)
instance StaticSize Hoge
    where staticSizeOf = \_ -> 8 :: Int
          staticAlignment = \_ -> 4 :: Int
instance ReadRaw Hoge
    where readRaw = \ptr_0 -> (pure Hoge <*> readRaw (Proxy @"hoge_x") ptr_0) <*> readRaw (Proxy @"hoge_y") ptr_0
instance WriteRaw Hoge
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       Hoge hoge_x_2
                                            hoge_y_3 -> writeRaw (Proxy @"hoge_x") ptr_0 hoge_x_2 >> writeRaw (Proxy @"hoge_y") ptr_0 hoge_y_3
deriving via (EquivStorable Hoge) instance Storable Hoge
instance HasCField Hoge "hoge_x"
    where type CFieldType Hoge "hoge_x" = CInt
          offset# = \_ -> \_ -> 0
instance TyEq ty (CFieldType Hoge "hoge_x") =>
         HasField "hoge_x" (Ptr Hoge) (Ptr ty)
    where getField = fromPtr (Proxy @"hoge_x")
instance HasCField Hoge "hoge_y"
    where type CFieldType Hoge "hoge_y" = CInt
          offset# = \_ -> \_ -> 4
instance TyEq ty (CFieldType Hoge "hoge_y") =>
         HasField "hoge_y" (Ptr Hoge) (Ptr ty)
    where getField = fromPtr (Proxy @"hoge_y")
