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

    __defined at:__ @types\/structs\/simple_structs.h 2:8@

    __exported by:__ @types\/structs\/simple_structs.h@
-}
data S1
    = S1 {s1_a :: CInt
          {- ^ __C declaration:__ @a@

               __defined at:__ @types\/structs\/simple_structs.h 3:9@

               __exported by:__ @types\/structs\/simple_structs.h@
          -},
          s1_b :: CChar
          {- ^ __C declaration:__ @b@

               __defined at:__ @types\/structs\/simple_structs.h 4:10@

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

           __defined at:__ @types\/structs\/simple_structs.h 2:8@

           __exported by:__ @types\/structs\/simple_structs.h@
      -}
    deriving stock (Eq, Show)
instance StaticSize S1
    where staticSizeOf = \_ -> 8 :: Int
          staticAlignment = \_ -> 4 :: Int
instance ReadRaw S1
    where readRaw = \ptr_0 -> (pure S1 <*> readRaw (Proxy @"s1_a") ptr_0) <*> readRaw (Proxy @"s1_b") ptr_0
instance WriteRaw S1
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       S1 s1_a_2
                                          s1_b_3 -> writeRaw (Proxy @"s1_a") ptr_0 s1_a_2 >> writeRaw (Proxy @"s1_b") ptr_0 s1_b_3
deriving via (EquivStorable S1) instance Storable S1
instance HasCField S1 "s1_a"
    where type CFieldType S1 "s1_a" = CInt
          offset# = \_ -> \_ -> 0
instance TyEq ty (CFieldType S1 "s1_a") =>
         HasField "s1_a" (Ptr S1) (Ptr ty)
    where getField = fromPtr (Proxy @"s1_a")
instance HasCField S1 "s1_b"
    where type CFieldType S1 "s1_b" = CChar
          offset# = \_ -> \_ -> 4
instance TyEq ty (CFieldType S1 "s1_b") =>
         HasField "s1_b" (Ptr S1) (Ptr ty)
    where getField = fromPtr (Proxy @"s1_b")
{-| __C declaration:__ @struct S2@

    __defined at:__ @types\/structs\/simple_structs.h 8:16@

    __exported by:__ @types\/structs\/simple_structs.h@
-}
data S2_t
    = S2_t {s2_t_a :: CChar
            {- ^ __C declaration:__ @a@

                 __defined at:__ @types\/structs\/simple_structs.h 9:10@

                 __exported by:__ @types\/structs\/simple_structs.h@
            -},
            s2_t_b :: CInt
            {- ^ __C declaration:__ @b@

                 __defined at:__ @types\/structs\/simple_structs.h 10:9@

                 __exported by:__ @types\/structs\/simple_structs.h@
            -},
            s2_t_c :: CFloat
            {- ^ __C declaration:__ @c@

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

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

           __defined at:__ @types\/structs\/simple_structs.h 8:16@

           __exported by:__ @types\/structs\/simple_structs.h@
      -}
    deriving stock (Eq, Show)
instance StaticSize S2_t
    where staticSizeOf = \_ -> 12 :: Int
          staticAlignment = \_ -> 4 :: Int
instance ReadRaw S2_t
    where readRaw = \ptr_0 -> ((pure S2_t <*> readRaw (Proxy @"s2_t_a") ptr_0) <*> readRaw (Proxy @"s2_t_b") ptr_0) <*> readRaw (Proxy @"s2_t_c") ptr_0
instance WriteRaw S2_t
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       S2_t s2_t_a_2
                                            s2_t_b_3
                                            s2_t_c_4 -> writeRaw (Proxy @"s2_t_a") ptr_0 s2_t_a_2 >> (writeRaw (Proxy @"s2_t_b") ptr_0 s2_t_b_3 >> writeRaw (Proxy @"s2_t_c") ptr_0 s2_t_c_4)
deriving via (EquivStorable S2_t) instance Storable S2_t
instance HasCField S2_t "s2_t_a"
    where type CFieldType S2_t "s2_t_a" = CChar
          offset# = \_ -> \_ -> 0
instance TyEq ty (CFieldType S2_t "s2_t_a") =>
         HasField "s2_t_a" (Ptr S2_t) (Ptr ty)
    where getField = fromPtr (Proxy @"s2_t_a")
instance HasCField S2_t "s2_t_b"
    where type CFieldType S2_t "s2_t_b" = CInt
          offset# = \_ -> \_ -> 4
instance TyEq ty (CFieldType S2_t "s2_t_b") =>
         HasField "s2_t_b" (Ptr S2_t) (Ptr ty)
    where getField = fromPtr (Proxy @"s2_t_b")
instance HasCField S2_t "s2_t_c"
    where type CFieldType S2_t "s2_t_c" = CFloat
          offset# = \_ -> \_ -> 8
instance TyEq ty (CFieldType S2_t "s2_t_c") =>
         HasField "s2_t_c" (Ptr S2_t) (Ptr ty)
    where getField = fromPtr (Proxy @"s2_t_c")
{-| __C declaration:__ @struct S3_t@

    __defined at:__ @types\/structs\/simple_structs.h 15:9@

    __exported by:__ @types\/structs\/simple_structs.h@
-}
data S3_t
    = S3_t {s3_t_a :: CChar
            {- ^ __C declaration:__ @a@

                 __defined at:__ @types\/structs\/simple_structs.h 16:10@

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

           __defined at:__ @types\/structs\/simple_structs.h 15:9@

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

    __defined at:__ @types\/structs\/simple_structs.h 19:8@

    __exported by:__ @types\/structs\/simple_structs.h@
-}
data S4
    = S4 {s4_b :: CChar
          {- ^ __C declaration:__ @b@

               __defined at:__ @types\/structs\/simple_structs.h 20:10@

               __exported by:__ @types\/structs\/simple_structs.h@
          -},
          s4_a :: CInt
          {- ^ __C declaration:__ @a@

               __defined at:__ @types\/structs\/simple_structs.h 21:9@

               __exported by:__ @types\/structs\/simple_structs.h@
          -},
          s4_c :: (Ptr CInt)
          {- ^ __C declaration:__ @c@

               __defined at:__ @types\/structs\/simple_structs.h 22:10@

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

           __defined at:__ @types\/structs\/simple_structs.h 19:8@

           __exported by:__ @types\/structs\/simple_structs.h@
      -}
    deriving stock (Eq, Show)
instance StaticSize S4
    where staticSizeOf = \_ -> 16 :: Int
          staticAlignment = \_ -> 8 :: Int
instance ReadRaw S4
    where readRaw = \ptr_0 -> ((pure S4 <*> readRaw (Proxy @"s4_b") ptr_0) <*> readRaw (Proxy @"s4_a") ptr_0) <*> readRaw (Proxy @"s4_c") ptr_0
instance WriteRaw S4
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       S4 s4_b_2
                                          s4_a_3
                                          s4_c_4 -> writeRaw (Proxy @"s4_b") ptr_0 s4_b_2 >> (writeRaw (Proxy @"s4_a") ptr_0 s4_a_3 >> writeRaw (Proxy @"s4_c") ptr_0 s4_c_4)
deriving via (EquivStorable S4) instance Storable S4
instance HasCField S4 "s4_b"
    where type CFieldType S4 "s4_b" = CChar
          offset# = \_ -> \_ -> 0
instance TyEq ty (CFieldType S4 "s4_b") =>
         HasField "s4_b" (Ptr S4) (Ptr ty)
    where getField = fromPtr (Proxy @"s4_b")
instance HasCField S4 "s4_a"
    where type CFieldType S4 "s4_a" = CInt
          offset# = \_ -> \_ -> 4
instance TyEq ty (CFieldType S4 "s4_a") =>
         HasField "s4_a" (Ptr S4) (Ptr ty)
    where getField = fromPtr (Proxy @"s4_a")
instance HasCField S4 "s4_c"
    where type CFieldType S4 "s4_c" = Ptr CInt
          offset# = \_ -> \_ -> 8
instance TyEq ty (CFieldType S4 "s4_c") =>
         HasField "s4_c" (Ptr S4) (Ptr ty)
    where getField = fromPtr (Proxy @"s4_c")
{-| __C declaration:__ @struct S5@

    __defined at:__ @types\/structs\/simple_structs.h 26:16@

    __exported by:__ @types\/structs\/simple_structs.h@
-}
data S5
    = S5 {s5_a :: CChar
          {- ^ __C declaration:__ @a@

               __defined at:__ @types\/structs\/simple_structs.h 27:10@

               __exported by:__ @types\/structs\/simple_structs.h@
          -},
          s5_b :: CInt
          {- ^ __C declaration:__ @b@

               __defined at:__ @types\/structs\/simple_structs.h 28:9@

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

           __defined at:__ @types\/structs\/simple_structs.h 26:16@

           __exported by:__ @types\/structs\/simple_structs.h@
      -}
    deriving stock (Eq, Show)
instance StaticSize S5
    where staticSizeOf = \_ -> 8 :: Int
          staticAlignment = \_ -> 4 :: Int
instance ReadRaw S5
    where readRaw = \ptr_0 -> (pure S5 <*> readRaw (Proxy @"s5_a") ptr_0) <*> readRaw (Proxy @"s5_b") ptr_0
instance WriteRaw S5
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       S5 s5_a_2
                                          s5_b_3 -> writeRaw (Proxy @"s5_a") ptr_0 s5_a_2 >> writeRaw (Proxy @"s5_b") ptr_0 s5_b_3
deriving via (EquivStorable S5) instance Storable S5
instance HasCField S5 "s5_a"
    where type CFieldType S5 "s5_a" = CChar
          offset# = \_ -> \_ -> 0
instance TyEq ty (CFieldType S5 "s5_a") =>
         HasField "s5_a" (Ptr S5) (Ptr ty)
    where getField = fromPtr (Proxy @"s5_a")
instance HasCField S5 "s5_b"
    where type CFieldType S5 "s5_b" = CInt
          offset# = \_ -> \_ -> 4
instance TyEq ty (CFieldType S5 "s5_b") =>
         HasField "s5_b" (Ptr S5) (Ptr ty)
    where getField = fromPtr (Proxy @"s5_b")
{-| __C declaration:__ @struct S6@

    __defined at:__ @types\/structs\/simple_structs.h 31:8@

    __exported by:__ @types\/structs\/simple_structs.h@
-}
data S6
    = S6 {s6_a :: CChar
          {- ^ __C declaration:__ @a@

               __defined at:__ @types\/structs\/simple_structs.h 31:18@

               __exported by:__ @types\/structs\/simple_structs.h@
          -},
          s6_b :: CInt
          {- ^ __C declaration:__ @b@

               __defined at:__ @types\/structs\/simple_structs.h 31:25@

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

           __defined at:__ @types\/structs\/simple_structs.h 31:8@

           __exported by:__ @types\/structs\/simple_structs.h@
      -}
    deriving stock (Eq, Show)
instance StaticSize S6
    where staticSizeOf = \_ -> 8 :: Int
          staticAlignment = \_ -> 4 :: Int
instance ReadRaw S6
    where readRaw = \ptr_0 -> (pure S6 <*> readRaw (Proxy @"s6_a") ptr_0) <*> readRaw (Proxy @"s6_b") ptr_0
instance WriteRaw S6
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       S6 s6_a_2
                                          s6_b_3 -> writeRaw (Proxy @"s6_a") ptr_0 s6_a_2 >> writeRaw (Proxy @"s6_b") ptr_0 s6_b_3
deriving via (EquivStorable S6) instance Storable S6
instance HasCField S6 "s6_a"
    where type CFieldType S6 "s6_a" = CChar
          offset# = \_ -> \_ -> 0
instance TyEq ty (CFieldType S6 "s6_a") =>
         HasField "s6_a" (Ptr S6) (Ptr ty)
    where getField = fromPtr (Proxy @"s6_a")
instance HasCField S6 "s6_b"
    where type CFieldType S6 "s6_b" = CInt
          offset# = \_ -> \_ -> 4
instance TyEq ty (CFieldType S6 "s6_b") =>
         HasField "s6_b" (Ptr S6) (Ptr ty)
    where getField = fromPtr (Proxy @"s6_b")
{-| __C declaration:__ @struct \@S7a_Aux@

    __defined at:__ @types\/structs\/simple_structs.h 34:9@

    __exported by:__ @types\/structs\/simple_structs.h@
-}
data S7a_Aux
    = S7a_Aux {s7a_Aux_a :: CChar
               {- ^ __C declaration:__ @a@

                    __defined at:__ @types\/structs\/simple_structs.h 34:23@

                    __exported by:__ @types\/structs\/simple_structs.h@
               -},
               s7a_Aux_b :: CInt
               {- ^ __C declaration:__ @b@

                    __defined at:__ @types\/structs\/simple_structs.h 34:30@

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

           __defined at:__ @types\/structs\/simple_structs.h 34:9@

           __exported by:__ @types\/structs\/simple_structs.h@
      -}
    deriving stock (Eq, Show)
instance StaticSize S7a_Aux
    where staticSizeOf = \_ -> 8 :: Int
          staticAlignment = \_ -> 4 :: Int
instance ReadRaw S7a_Aux
    where readRaw = \ptr_0 -> (pure S7a_Aux <*> readRaw (Proxy @"s7a_Aux_a") ptr_0) <*> readRaw (Proxy @"s7a_Aux_b") ptr_0
instance WriteRaw S7a_Aux
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       S7a_Aux s7a_Aux_a_2
                                               s7a_Aux_b_3 -> writeRaw (Proxy @"s7a_Aux_a") ptr_0 s7a_Aux_a_2 >> writeRaw (Proxy @"s7a_Aux_b") ptr_0 s7a_Aux_b_3
deriving via (EquivStorable S7a_Aux) instance Storable S7a_Aux
instance HasCField S7a_Aux "s7a_Aux_a"
    where type CFieldType S7a_Aux "s7a_Aux_a" = CChar
          offset# = \_ -> \_ -> 0
instance TyEq ty (CFieldType S7a_Aux "s7a_Aux_a") =>
         HasField "s7a_Aux_a" (Ptr S7a_Aux) (Ptr ty)
    where getField = fromPtr (Proxy @"s7a_Aux_a")
instance HasCField S7a_Aux "s7a_Aux_b"
    where type CFieldType S7a_Aux "s7a_Aux_b" = CInt
          offset# = \_ -> \_ -> 4
instance TyEq ty (CFieldType S7a_Aux "s7a_Aux_b") =>
         HasField "s7a_Aux_b" (Ptr S7a_Aux) (Ptr ty)
    where getField = fromPtr (Proxy @"s7a_Aux_b")
{-| __C declaration:__ @S7a@

    __defined at:__ @types\/structs\/simple_structs.h 34:36@

    __exported by:__ @types\/structs\/simple_structs.h@
-}
newtype S7a
    = S7a {unwrapS7a :: (Ptr S7a_Aux)}
      {- ^ __C declaration:__ @S7a@

           __defined at:__ @types\/structs\/simple_structs.h 34:36@

           __exported by:__ @types\/structs\/simple_structs.h@
      -}
    deriving stock (Eq, Ord, Show)
    deriving newtype (StaticSize,
                      ReadRaw,
                      WriteRaw,
                      Storable,
                      HasFFIType)
instance TyEq ty (CFieldType S7a "unwrapS7a") =>
         HasField "unwrapS7a" (Ptr S7a) (Ptr ty)
    where getField = fromPtr (Proxy @"unwrapS7a")
instance HasCField S7a "unwrapS7a"
    where type CFieldType S7a "unwrapS7a" = Ptr S7a_Aux
          offset# = \_ -> \_ -> 0
{-| __C declaration:__ @struct \@S7b_Aux@

    __defined at:__ @types\/structs\/simple_structs.h 35:9@

    __exported by:__ @types\/structs\/simple_structs.h@
-}
data S7b_Aux
    = S7b_Aux {s7b_Aux_a :: CChar
               {- ^ __C declaration:__ @a@

                    __defined at:__ @types\/structs\/simple_structs.h 35:23@

                    __exported by:__ @types\/structs\/simple_structs.h@
               -},
               s7b_Aux_b :: CInt
               {- ^ __C declaration:__ @b@

                    __defined at:__ @types\/structs\/simple_structs.h 35:30@

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

           __defined at:__ @types\/structs\/simple_structs.h 35:9@

           __exported by:__ @types\/structs\/simple_structs.h@
      -}
    deriving stock (Eq, Show)
instance StaticSize S7b_Aux
    where staticSizeOf = \_ -> 8 :: Int
          staticAlignment = \_ -> 4 :: Int
instance ReadRaw S7b_Aux
    where readRaw = \ptr_0 -> (pure S7b_Aux <*> readRaw (Proxy @"s7b_Aux_a") ptr_0) <*> readRaw (Proxy @"s7b_Aux_b") ptr_0
instance WriteRaw S7b_Aux
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       S7b_Aux s7b_Aux_a_2
                                               s7b_Aux_b_3 -> writeRaw (Proxy @"s7b_Aux_a") ptr_0 s7b_Aux_a_2 >> writeRaw (Proxy @"s7b_Aux_b") ptr_0 s7b_Aux_b_3
deriving via (EquivStorable S7b_Aux) instance Storable S7b_Aux
instance HasCField S7b_Aux "s7b_Aux_a"
    where type CFieldType S7b_Aux "s7b_Aux_a" = CChar
          offset# = \_ -> \_ -> 0
instance TyEq ty (CFieldType S7b_Aux "s7b_Aux_a") =>
         HasField "s7b_Aux_a" (Ptr S7b_Aux) (Ptr ty)
    where getField = fromPtr (Proxy @"s7b_Aux_a")
instance HasCField S7b_Aux "s7b_Aux_b"
    where type CFieldType S7b_Aux "s7b_Aux_b" = CInt
          offset# = \_ -> \_ -> 4
instance TyEq ty (CFieldType S7b_Aux "s7b_Aux_b") =>
         HasField "s7b_Aux_b" (Ptr S7b_Aux) (Ptr ty)
    where getField = fromPtr (Proxy @"s7b_Aux_b")
{-| __C declaration:__ @S7b@

    __defined at:__ @types\/structs\/simple_structs.h 35:38@

    __exported by:__ @types\/structs\/simple_structs.h@
-}
newtype S7b
    = S7b {unwrapS7b :: (Ptr (Ptr (Ptr S7b_Aux)))}
      {- ^ __C declaration:__ @S7b@

           __defined at:__ @types\/structs\/simple_structs.h 35:38@

           __exported by:__ @types\/structs\/simple_structs.h@
      -}
    deriving stock (Eq, Ord, Show)
    deriving newtype (StaticSize,
                      ReadRaw,
                      WriteRaw,
                      Storable,
                      HasFFIType)
instance TyEq ty (CFieldType S7b "unwrapS7b") =>
         HasField "unwrapS7b" (Ptr S7b) (Ptr ty)
    where getField = fromPtr (Proxy @"unwrapS7b")
instance HasCField S7b "unwrapS7b"
    where type CFieldType S7b "unwrapS7b" = Ptr (Ptr (Ptr S7b_Aux))
          offset# = \_ -> \_ -> 0
