-- addDependentFile examples/golden/types/structs/circular_dependency_struct.h
{-| __C declaration:__ @struct b@

    __defined at:__ @types\/structs\/circular_dependency_struct.h 3:8@

    __exported by:__ @types\/structs\/circular_dependency_struct.h@
-}
data B
    = B {b_toA :: (Ptr A)
         {- ^ __C declaration:__ @toA@

              __defined at:__ @types\/structs\/circular_dependency_struct.h 4:13@

              __exported by:__ @types\/structs\/circular_dependency_struct.h@
         -}}
      {- ^ __C declaration:__ @struct b@

           __defined at:__ @types\/structs\/circular_dependency_struct.h 3:8@

           __exported by:__ @types\/structs\/circular_dependency_struct.h@
      -}
    deriving stock (Eq, Show)
instance StaticSize B
    where staticSizeOf = \_ -> 8 :: Int
          staticAlignment = \_ -> 8 :: Int
instance ReadRaw B
    where readRaw = \ptr_0 -> pure B <*> readRaw (Proxy @"b_toA") ptr_0
instance WriteRaw B
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       B b_toA_2 -> writeRaw (Proxy @"b_toA") ptr_0 b_toA_2
deriving via (EquivStorable B) instance Storable B
instance HasCField B "b_toA"
    where type CFieldType B "b_toA" = Ptr A
          offset# = \_ -> \_ -> 0
instance TyEq ty (CFieldType B "b_toA") =>
         HasField "b_toA" (Ptr B) (Ptr ty)
    where getField = fromPtr (Proxy @"b_toA")
{-| __C declaration:__ @struct a@

    __defined at:__ @types\/structs\/circular_dependency_struct.h 7:8@

    __exported by:__ @types\/structs\/circular_dependency_struct.h@
-}
data A
    = A {a_toB :: B
         {- ^ __C declaration:__ @toB@

              __defined at:__ @types\/structs\/circular_dependency_struct.h 8:12@

              __exported by:__ @types\/structs\/circular_dependency_struct.h@
         -}}
      {- ^ __C declaration:__ @struct a@

           __defined at:__ @types\/structs\/circular_dependency_struct.h 7:8@

           __exported by:__ @types\/structs\/circular_dependency_struct.h@
      -}
    deriving stock (Eq, Show)
instance StaticSize A
    where staticSizeOf = \_ -> 8 :: Int
          staticAlignment = \_ -> 8 :: Int
instance ReadRaw A
    where readRaw = \ptr_0 -> pure A <*> readRaw (Proxy @"a_toB") ptr_0
instance WriteRaw A
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       A a_toB_2 -> writeRaw (Proxy @"a_toB") ptr_0 a_toB_2
deriving via (EquivStorable A) instance Storable A
instance HasCField A "a_toB"
    where type CFieldType A "a_toB" = B
          offset# = \_ -> \_ -> 0
instance TyEq ty (CFieldType A "a_toB") =>
         HasField "a_toB" (Ptr A) (Ptr ty)
    where getField = fromPtr (Proxy @"a_toB")
