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

    __defined at:__ @types\/structs\/recursive_struct.h 1:16@

    __exported by:__ @types\/structs\/recursive_struct.h@
-}
data Linked_list_A_t
    = Linked_list_A_t {linked_list_A_t_x :: CInt
                       {- ^ __C declaration:__ @x@

                            __defined at:__ @types\/structs\/recursive_struct.h 2:7@

                            __exported by:__ @types\/structs\/recursive_struct.h@
                       -},
                       linked_list_A_t_next :: (Ptr Linked_list_A_t)
                       {- ^ __C declaration:__ @next@

                            __defined at:__ @types\/structs\/recursive_struct.h 3:27@

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

           __defined at:__ @types\/structs\/recursive_struct.h 1:16@

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

    __defined at:__ @types\/structs\/recursive_struct.h 9:8@

    __exported by:__ @types\/structs\/recursive_struct.h@
-}
data Linked_list_B_t
    = Linked_list_B_t {linked_list_B_t_x :: CInt
                       {- ^ __C declaration:__ @x@

                            __defined at:__ @types\/structs\/recursive_struct.h 10:7@

                            __exported by:__ @types\/structs\/recursive_struct.h@
                       -},
                       linked_list_B_t_next :: (Ptr Linked_list_B_t)
                       {- ^ __C declaration:__ @next@

                            __defined at:__ @types\/structs\/recursive_struct.h 11:20@

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

           __defined at:__ @types\/structs\/recursive_struct.h 9:8@

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