-- addDependentFile examples/golden/attributes/attributes.h
{-| __C declaration:__ @struct foo@

    __defined at:__ @attributes\/attributes.h 10:36@

    __exported by:__ @attributes\/attributes.h@
-}
data Foo
    = Foo {foo_c :: CChar
           {- ^ __C declaration:__ @c@

                __defined at:__ @attributes\/attributes.h 11:10@

                __exported by:__ @attributes\/attributes.h@
           -},
           foo_i :: CInt
           {- ^ __C declaration:__ @i@

                __defined at:__ @attributes\/attributes.h 12:10@

                __exported by:__ @attributes\/attributes.h@
           -}}
      {- ^ __C declaration:__ @struct foo@

           __defined at:__ @attributes\/attributes.h 10:36@

           __exported by:__ @attributes\/attributes.h@
      -}
    deriving stock (Eq, Show)
instance StaticSize Foo
    where staticSizeOf = \_ -> 5 :: Int
          staticAlignment = \_ -> 1 :: Int
instance ReadRaw Foo
    where readRaw = \ptr_0 -> (pure Foo <*> readRaw (Proxy @"foo_c") ptr_0) <*> readRaw (Proxy @"foo_i") ptr_0
instance WriteRaw Foo
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       Foo foo_c_2
                                           foo_i_3 -> writeRaw (Proxy @"foo_c") ptr_0 foo_c_2 >> writeRaw (Proxy @"foo_i") ptr_0 foo_i_3
deriving via (EquivStorable Foo) instance Storable Foo
instance HasCField Foo "foo_c"
    where type CFieldType Foo "foo_c" = CChar
          offset# = \_ -> \_ -> 0
instance TyEq ty (CFieldType Foo "foo_c") =>
         HasField "foo_c" (Ptr Foo) (Ptr ty)
    where getField = fromPtr (Proxy @"foo_c")
instance HasCField Foo "foo_i"
    where type CFieldType Foo "foo_i" = CInt
          offset# = \_ -> \_ -> 1
instance TyEq ty (CFieldType Foo "foo_i") =>
         HasField "foo_i" (Ptr Foo) (Ptr ty)
    where getField = fromPtr (Proxy @"foo_i")
{-| __C declaration:__ @struct bar@

    __defined at:__ @attributes\/attributes.h 16:15@

    __exported by:__ @attributes\/attributes.h@
-}
data Bar
    = Bar {bar_c :: CChar
           {- ^ __C declaration:__ @c@

                __defined at:__ @attributes\/attributes.h 17:10@

                __exported by:__ @attributes\/attributes.h@
           -},
           bar_i :: CInt
           {- ^ __C declaration:__ @i@

                __defined at:__ @attributes\/attributes.h 18:10@

                __exported by:__ @attributes\/attributes.h@
           -}}
      {- ^ __C declaration:__ @struct bar@

           __defined at:__ @attributes\/attributes.h 16:15@

           __exported by:__ @attributes\/attributes.h@
      -}
    deriving stock (Eq, Show)
instance StaticSize Bar
    where staticSizeOf = \_ -> 5 :: Int
          staticAlignment = \_ -> 1 :: Int
instance ReadRaw Bar
    where readRaw = \ptr_0 -> (pure Bar <*> readRaw (Proxy @"bar_c") ptr_0) <*> readRaw (Proxy @"bar_i") ptr_0
instance WriteRaw Bar
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       Bar bar_c_2
                                           bar_i_3 -> writeRaw (Proxy @"bar_c") ptr_0 bar_c_2 >> writeRaw (Proxy @"bar_i") ptr_0 bar_i_3
deriving via (EquivStorable Bar) instance Storable Bar
instance HasCField Bar "bar_c"
    where type CFieldType Bar "bar_c" = CChar
          offset# = \_ -> \_ -> 0
instance TyEq ty (CFieldType Bar "bar_c") =>
         HasField "bar_c" (Ptr Bar) (Ptr ty)
    where getField = fromPtr (Proxy @"bar_c")
instance HasCField Bar "bar_i"
    where type CFieldType Bar "bar_i" = CInt
          offset# = \_ -> \_ -> 1
instance TyEq ty (CFieldType Bar "bar_i") =>
         HasField "bar_i" (Ptr Bar) (Ptr ty)
    where getField = fromPtr (Proxy @"bar_i")
{-| __C declaration:__ @struct baz@

    __defined at:__ @attributes\/attributes.h 22:9@

    __exported by:__ @attributes\/attributes.h@
-}
data Baz
    = Baz {baz_c :: CChar
           {- ^ __C declaration:__ @c@

                __defined at:__ @attributes\/attributes.h 23:10@

                __exported by:__ @attributes\/attributes.h@
           -},
           baz_i :: CInt
           {- ^ __C declaration:__ @i@

                __defined at:__ @attributes\/attributes.h 24:10@

                __exported by:__ @attributes\/attributes.h@
           -}}
      {- ^ __C declaration:__ @struct baz@

           __defined at:__ @attributes\/attributes.h 22:9@

           __exported by:__ @attributes\/attributes.h@
      -}
    deriving stock (Eq, Show)
instance StaticSize Baz
    where staticSizeOf = \_ -> 5 :: Int
          staticAlignment = \_ -> 1 :: Int
instance ReadRaw Baz
    where readRaw = \ptr_0 -> (pure Baz <*> readRaw (Proxy @"baz_c") ptr_0) <*> readRaw (Proxy @"baz_i") ptr_0
instance WriteRaw Baz
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       Baz baz_c_2
                                           baz_i_3 -> writeRaw (Proxy @"baz_c") ptr_0 baz_c_2 >> writeRaw (Proxy @"baz_i") ptr_0 baz_i_3
deriving via (EquivStorable Baz) instance Storable Baz
instance HasCField Baz "baz_c"
    where type CFieldType Baz "baz_c" = CChar
          offset# = \_ -> \_ -> 0
instance TyEq ty (CFieldType Baz "baz_c") =>
         HasField "baz_c" (Ptr Baz) (Ptr ty)
    where getField = fromPtr (Proxy @"baz_c")
instance HasCField Baz "baz_i"
    where type CFieldType Baz "baz_i" = CInt
          offset# = \_ -> \_ -> 1
instance TyEq ty (CFieldType Baz "baz_i") =>
         HasField "baz_i" (Ptr Baz) (Ptr ty)
    where getField = fromPtr (Proxy @"baz_i")
{-| __C declaration:__ @struct qux@

    __defined at:__ @attributes\/attributes.h 28:9@

    __exported by:__ @attributes\/attributes.h@
-}
data Qux
    = Qux {qux_c :: CChar
           {- ^ __C declaration:__ @c@

                __defined at:__ @attributes\/attributes.h 29:10@

                __exported by:__ @attributes\/attributes.h@
           -},
           qux_i :: CInt
           {- ^ __C declaration:__ @i@

                __defined at:__ @attributes\/attributes.h 30:10@

                __exported by:__ @attributes\/attributes.h@
           -}}
      {- ^ __C declaration:__ @struct qux@

           __defined at:__ @attributes\/attributes.h 28:9@

           __exported by:__ @attributes\/attributes.h@
      -}
    deriving stock (Eq, Show)
instance StaticSize Qux
    where staticSizeOf = \_ -> 5 :: Int
          staticAlignment = \_ -> 1 :: Int
instance ReadRaw Qux
    where readRaw = \ptr_0 -> (pure Qux <*> readRaw (Proxy @"qux_c") ptr_0) <*> readRaw (Proxy @"qux_i") ptr_0
instance WriteRaw Qux
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       Qux qux_c_2
                                           qux_i_3 -> writeRaw (Proxy @"qux_c") ptr_0 qux_c_2 >> writeRaw (Proxy @"qux_i") ptr_0 qux_i_3
deriving via (EquivStorable Qux) instance Storable Qux
instance HasCField Qux "qux_c"
    where type CFieldType Qux "qux_c" = CChar
          offset# = \_ -> \_ -> 0
instance TyEq ty (CFieldType Qux "qux_c") =>
         HasField "qux_c" (Ptr Qux) (Ptr ty)
    where getField = fromPtr (Proxy @"qux_c")
instance HasCField Qux "qux_i"
    where type CFieldType Qux "qux_i" = CInt
          offset# = \_ -> \_ -> 1
instance TyEq ty (CFieldType Qux "qux_i") =>
         HasField "qux_i" (Ptr Qux) (Ptr ty)
    where getField = fromPtr (Proxy @"qux_i")
{-| __C declaration:__ @struct __sFILE@

    __defined at:__ @attributes\/attributes.h 34:16@

    __exported by:__ @attributes\/attributes.h@
-}
data FILE
    = FILE {fILE__r :: CInt
            {- ^ __C declaration:__ @_r@

                 __defined at:__ @attributes\/attributes.h 35:9@

                 __exported by:__ @attributes\/attributes.h@
            -},
            fILE__w :: CInt
            {- ^ __C declaration:__ @_w@

                 __defined at:__ @attributes\/attributes.h 36:9@

                 __exported by:__ @attributes\/attributes.h@
            -},
            fILE__close :: (FunPtr (Ptr Void -> IO CInt))
            {- ^ __C declaration:__ @_close@

                 __defined at:__ @attributes\/attributes.h 37:22@

                 __exported by:__ @attributes\/attributes.h@
            -}}
      {- ^ __C declaration:__ @struct __sFILE@

           __defined at:__ @attributes\/attributes.h 34:16@

           __exported by:__ @attributes\/attributes.h@
      -}
    deriving stock (Eq, Show)
instance StaticSize FILE
    where staticSizeOf = \_ -> 16 :: Int
          staticAlignment = \_ -> 8 :: Int
instance ReadRaw FILE
    where readRaw = \ptr_0 -> ((pure FILE <*> readRaw (Proxy @"fILE__r") ptr_0) <*> readRaw (Proxy @"fILE__w") ptr_0) <*> readRaw (Proxy @"fILE__close") ptr_0
instance WriteRaw FILE
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       FILE fILE__r_2
                                            fILE__w_3
                                            fILE__close_4 -> writeRaw (Proxy @"fILE__r") ptr_0 fILE__r_2 >> (writeRaw (Proxy @"fILE__w") ptr_0 fILE__w_3 >> writeRaw (Proxy @"fILE__close") ptr_0 fILE__close_4)
deriving via (EquivStorable FILE) instance Storable FILE
instance HasCField FILE "fILE__r"
    where type CFieldType FILE "fILE__r" = CInt
          offset# = \_ -> \_ -> 0
instance TyEq ty (CFieldType FILE "fILE__r") =>
         HasField "fILE__r" (Ptr FILE) (Ptr ty)
    where getField = fromPtr (Proxy @"fILE__r")
instance HasCField FILE "fILE__w"
    where type CFieldType FILE "fILE__w" = CInt
          offset# = \_ -> \_ -> 4
instance TyEq ty (CFieldType FILE "fILE__w") =>
         HasField "fILE__w" (Ptr FILE) (Ptr ty)
    where getField = fromPtr (Proxy @"fILE__w")
instance HasCField FILE "fILE__close"
    where type CFieldType FILE "fILE__close" = FunPtr (Ptr Void ->
                                                       IO CInt)
          offset# = \_ -> \_ -> 8
instance TyEq ty (CFieldType FILE "fILE__close") =>
         HasField "fILE__close" (Ptr FILE) (Ptr ty)
    where getField = fromPtr (Proxy @"fILE__close")
