-- addDependentFile examples/golden/types/enums/enums.h
{-| __C declaration:__ @enum first@

    __defined at:__ @types\/enums\/enums.h 4:6@

    __exported by:__ @types\/enums\/enums.h@
-}
newtype First
    = First {unwrapFirst :: CUInt}
      {- ^ __C declaration:__ @enum first@

           __defined at:__ @types\/enums\/enums.h 4:6@

           __exported by:__ @types\/enums\/enums.h@
      -}
    deriving stock (Eq, Ord)
    deriving newtype HasFFIType
instance StaticSize First
    where staticSizeOf = \_ -> 4 :: Int
          staticAlignment = \_ -> 4 :: Int
instance ReadRaw First
    where readRaw = \ptr_0 -> pure First <*> readRawByteOff ptr_0 (0 :: Int)
instance WriteRaw First
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       First unwrapFirst_2 -> writeRawByteOff ptr_0 (0 :: Int) unwrapFirst_2
deriving via (EquivStorable First) instance Storable First
deriving via CUInt instance Prim First
instance CEnum First
    where type CEnumZ First = CUInt
          toCEnum = First
          fromCEnum = unwrapFirst
          declaredValues = \_ -> declaredValuesFromList [(0,
                                                          singleton "FIRST1"),
                                                         (1, singleton "FIRST2")]
          showsUndeclared = showsWrappedUndeclared "First"
          readPrecUndeclared = readPrecWrappedUndeclared "First"
          isDeclared = seqIsDeclared
          mkDeclared = seqMkDeclared
instance SequentialCEnum First
    where minDeclaredValue = FIRST1
          maxDeclaredValue = FIRST2
instance Show First
    where showsPrec = shows
instance Read First
    where readPrec = readPrec
          readList = readListDefault
          readListPrec = readListPrecDefault
instance TyEq ty (CFieldType First "unwrapFirst") =>
         HasField "unwrapFirst" (Ptr First) (Ptr ty)
    where getField = fromPtr (Proxy @"unwrapFirst")
instance HasCField First "unwrapFirst"
    where type CFieldType First "unwrapFirst" = CUInt
          offset# = \_ -> \_ -> 0
{-| __C declaration:__ @FIRST1@

    __defined at:__ @types\/enums\/enums.h 5:5@

    __exported by:__ @types\/enums\/enums.h@
-}
pattern FIRST1 :: First
{-| __C declaration:__ @FIRST1@

    __defined at:__ @types\/enums\/enums.h 5:5@

    __exported by:__ @types\/enums\/enums.h@
-}
pattern FIRST1 = First 0
{-| __C declaration:__ @FIRST2@

    __defined at:__ @types\/enums\/enums.h 6:5@

    __exported by:__ @types\/enums\/enums.h@
-}
pattern FIRST2 :: First
{-| __C declaration:__ @FIRST2@

    __defined at:__ @types\/enums\/enums.h 6:5@

    __exported by:__ @types\/enums\/enums.h@
-}
pattern FIRST2 = First 1
{-| __C declaration:__ @enum second@

    __defined at:__ @types\/enums\/enums.h 9:6@

    __exported by:__ @types\/enums\/enums.h@
-}
newtype Second
    = Second {unwrapSecond :: CInt}
      {- ^ __C declaration:__ @enum second@

           __defined at:__ @types\/enums\/enums.h 9:6@

           __exported by:__ @types\/enums\/enums.h@
      -}
    deriving stock (Eq, Ord)
    deriving newtype HasFFIType
instance StaticSize Second
    where staticSizeOf = \_ -> 4 :: Int
          staticAlignment = \_ -> 4 :: Int
instance ReadRaw Second
    where readRaw = \ptr_0 -> pure Second <*> readRawByteOff ptr_0 (0 :: Int)
instance WriteRaw Second
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       Second unwrapSecond_2 -> writeRawByteOff ptr_0 (0 :: Int) unwrapSecond_2
deriving via (EquivStorable Second) instance Storable Second
deriving via CInt instance Prim Second
instance CEnum Second
    where type CEnumZ Second = CInt
          toCEnum = Second
          fromCEnum = unwrapSecond
          declaredValues = \_ -> declaredValuesFromList [(-1,
                                                          singleton "SECOND_A"),
                                                         (0, singleton "SECOND_B"),
                                                         (1, singleton "SECOND_C")]
          showsUndeclared = showsWrappedUndeclared "Second"
          readPrecUndeclared = readPrecWrappedUndeclared "Second"
          isDeclared = seqIsDeclared
          mkDeclared = seqMkDeclared
instance SequentialCEnum Second
    where minDeclaredValue = SECOND_A
          maxDeclaredValue = SECOND_C
instance Show Second
    where showsPrec = shows
instance Read Second
    where readPrec = readPrec
          readList = readListDefault
          readListPrec = readListPrecDefault
instance TyEq ty (CFieldType Second "unwrapSecond") =>
         HasField "unwrapSecond" (Ptr Second) (Ptr ty)
    where getField = fromPtr (Proxy @"unwrapSecond")
instance HasCField Second "unwrapSecond"
    where type CFieldType Second "unwrapSecond" = CInt
          offset# = \_ -> \_ -> 0
{-| __C declaration:__ @SECOND_A@

    __defined at:__ @types\/enums\/enums.h 10:5@

    __exported by:__ @types\/enums\/enums.h@
-}
pattern SECOND_A :: Second
{-| __C declaration:__ @SECOND_A@

    __defined at:__ @types\/enums\/enums.h 10:5@

    __exported by:__ @types\/enums\/enums.h@
-}
pattern SECOND_A = Second (-1)
{-| __C declaration:__ @SECOND_B@

    __defined at:__ @types\/enums\/enums.h 11:5@

    __exported by:__ @types\/enums\/enums.h@
-}
pattern SECOND_B :: Second
{-| __C declaration:__ @SECOND_B@

    __defined at:__ @types\/enums\/enums.h 11:5@

    __exported by:__ @types\/enums\/enums.h@
-}
pattern SECOND_B = Second 0
{-| __C declaration:__ @SECOND_C@

    __defined at:__ @types\/enums\/enums.h 12:5@

    __exported by:__ @types\/enums\/enums.h@
-}
pattern SECOND_C :: Second
{-| __C declaration:__ @SECOND_C@

    __defined at:__ @types\/enums\/enums.h 12:5@

    __exported by:__ @types\/enums\/enums.h@
-}
pattern SECOND_C = Second 1
{-| __C declaration:__ @enum same@

    __defined at:__ @types\/enums\/enums.h 15:6@

    __exported by:__ @types\/enums\/enums.h@
-}
newtype Same
    = Same {unwrapSame :: CUInt}
      {- ^ __C declaration:__ @enum same@

           __defined at:__ @types\/enums\/enums.h 15:6@

           __exported by:__ @types\/enums\/enums.h@
      -}
    deriving stock (Eq, Ord)
    deriving newtype HasFFIType
instance StaticSize Same
    where staticSizeOf = \_ -> 4 :: Int
          staticAlignment = \_ -> 4 :: Int
instance ReadRaw Same
    where readRaw = \ptr_0 -> pure Same <*> readRawByteOff ptr_0 (0 :: Int)
instance WriteRaw Same
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       Same unwrapSame_2 -> writeRawByteOff ptr_0 (0 :: Int) unwrapSame_2
deriving via (EquivStorable Same) instance Storable Same
deriving via CUInt instance Prim Same
instance CEnum Same
    where type CEnumZ Same = CUInt
          toCEnum = Same
          fromCEnum = unwrapSame
          declaredValues = \_ -> declaredValuesFromList [(1,
                                                          "SAME_A" :| ["SAME_B"])]
          showsUndeclared = showsWrappedUndeclared "Same"
          readPrecUndeclared = readPrecWrappedUndeclared "Same"
          isDeclared = seqIsDeclared
          mkDeclared = seqMkDeclared
instance SequentialCEnum Same
    where minDeclaredValue = SAME_A
          maxDeclaredValue = SAME_A
instance Show Same
    where showsPrec = shows
instance Read Same
    where readPrec = readPrec
          readList = readListDefault
          readListPrec = readListPrecDefault
instance TyEq ty (CFieldType Same "unwrapSame") =>
         HasField "unwrapSame" (Ptr Same) (Ptr ty)
    where getField = fromPtr (Proxy @"unwrapSame")
instance HasCField Same "unwrapSame"
    where type CFieldType Same "unwrapSame" = CUInt
          offset# = \_ -> \_ -> 0
{-| __C declaration:__ @SAME_A@

    __defined at:__ @types\/enums\/enums.h 16:5@

    __exported by:__ @types\/enums\/enums.h@
-}
pattern SAME_A :: Same
{-| __C declaration:__ @SAME_A@

    __defined at:__ @types\/enums\/enums.h 16:5@

    __exported by:__ @types\/enums\/enums.h@
-}
pattern SAME_A = Same 1
{-| __C declaration:__ @SAME_B@

    __defined at:__ @types\/enums\/enums.h 17:5@

    __exported by:__ @types\/enums\/enums.h@
-}
pattern SAME_B :: Same
{-| __C declaration:__ @SAME_B@

    __defined at:__ @types\/enums\/enums.h 17:5@

    __exported by:__ @types\/enums\/enums.h@
-}
pattern SAME_B = Same 1
{-| __C declaration:__ @enum nonseq@

    __defined at:__ @types\/enums\/enums.h 20:6@

    __exported by:__ @types\/enums\/enums.h@
-}
newtype Nonseq
    = Nonseq {unwrapNonseq :: CUInt}
      {- ^ __C declaration:__ @enum nonseq@

           __defined at:__ @types\/enums\/enums.h 20:6@

           __exported by:__ @types\/enums\/enums.h@
      -}
    deriving stock (Eq, Ord)
    deriving newtype HasFFIType
instance StaticSize Nonseq
    where staticSizeOf = \_ -> 4 :: Int
          staticAlignment = \_ -> 4 :: Int
instance ReadRaw Nonseq
    where readRaw = \ptr_0 -> pure Nonseq <*> readRawByteOff ptr_0 (0 :: Int)
instance WriteRaw Nonseq
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       Nonseq unwrapNonseq_2 -> writeRawByteOff ptr_0 (0 :: Int) unwrapNonseq_2
deriving via (EquivStorable Nonseq) instance Storable Nonseq
deriving via CUInt instance Prim Nonseq
instance CEnum Nonseq
    where type CEnumZ Nonseq = CUInt
          toCEnum = Nonseq
          fromCEnum = unwrapNonseq
          declaredValues = \_ -> declaredValuesFromList [(200,
                                                          singleton "NONSEQ_A"),
                                                         (301, singleton "NONSEQ_B"),
                                                         (404, singleton "NONSEQ_C")]
          showsUndeclared = showsWrappedUndeclared "Nonseq"
          readPrecUndeclared = readPrecWrappedUndeclared "Nonseq"
instance Show Nonseq
    where showsPrec = shows
instance Read Nonseq
    where readPrec = readPrec
          readList = readListDefault
          readListPrec = readListPrecDefault
instance TyEq ty (CFieldType Nonseq "unwrapNonseq") =>
         HasField "unwrapNonseq" (Ptr Nonseq) (Ptr ty)
    where getField = fromPtr (Proxy @"unwrapNonseq")
instance HasCField Nonseq "unwrapNonseq"
    where type CFieldType Nonseq "unwrapNonseq" = CUInt
          offset# = \_ -> \_ -> 0
{-| __C declaration:__ @NONSEQ_A@

    __defined at:__ @types\/enums\/enums.h 21:5@

    __exported by:__ @types\/enums\/enums.h@
-}
pattern NONSEQ_A :: Nonseq
{-| __C declaration:__ @NONSEQ_A@

    __defined at:__ @types\/enums\/enums.h 21:5@

    __exported by:__ @types\/enums\/enums.h@
-}
pattern NONSEQ_A = Nonseq 200
{-| __C declaration:__ @NONSEQ_B@

    __defined at:__ @types\/enums\/enums.h 22:5@

    __exported by:__ @types\/enums\/enums.h@
-}
pattern NONSEQ_B :: Nonseq
{-| __C declaration:__ @NONSEQ_B@

    __defined at:__ @types\/enums\/enums.h 22:5@

    __exported by:__ @types\/enums\/enums.h@
-}
pattern NONSEQ_B = Nonseq 301
{-| __C declaration:__ @NONSEQ_C@

    __defined at:__ @types\/enums\/enums.h 23:5@

    __exported by:__ @types\/enums\/enums.h@
-}
pattern NONSEQ_C :: Nonseq
{-| __C declaration:__ @NONSEQ_C@

    __defined at:__ @types\/enums\/enums.h 23:5@

    __exported by:__ @types\/enums\/enums.h@
-}
pattern NONSEQ_C = Nonseq 404
{-| __C declaration:__ @enum packed@

    __defined at:__ @types\/enums\/enums.h 26:6@

    __exported by:__ @types\/enums\/enums.h@
-}
newtype Packed
    = Packed {unwrapPacked :: CUChar}
      {- ^ __C declaration:__ @enum packed@

           __defined at:__ @types\/enums\/enums.h 26:6@

           __exported by:__ @types\/enums\/enums.h@
      -}
    deriving stock (Eq, Ord)
    deriving newtype HasFFIType
instance StaticSize Packed
    where staticSizeOf = \_ -> 1 :: Int
          staticAlignment = \_ -> 1 :: Int
instance ReadRaw Packed
    where readRaw = \ptr_0 -> pure Packed <*> readRawByteOff ptr_0 (0 :: Int)
instance WriteRaw Packed
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       Packed unwrapPacked_2 -> writeRawByteOff ptr_0 (0 :: Int) unwrapPacked_2
deriving via (EquivStorable Packed) instance Storable Packed
deriving via CUChar instance Prim Packed
instance CEnum Packed
    where type CEnumZ Packed = CUChar
          toCEnum = Packed
          fromCEnum = unwrapPacked
          declaredValues = \_ -> declaredValuesFromList [(0,
                                                          singleton "PACKED_A"),
                                                         (1, singleton "PACKED_B"),
                                                         (2, singleton "PACKED_C")]
          showsUndeclared = showsWrappedUndeclared "Packed"
          readPrecUndeclared = readPrecWrappedUndeclared "Packed"
          isDeclared = seqIsDeclared
          mkDeclared = seqMkDeclared
instance SequentialCEnum Packed
    where minDeclaredValue = PACKED_A
          maxDeclaredValue = PACKED_C
instance Show Packed
    where showsPrec = shows
instance Read Packed
    where readPrec = readPrec
          readList = readListDefault
          readListPrec = readListPrecDefault
instance TyEq ty (CFieldType Packed "unwrapPacked") =>
         HasField "unwrapPacked" (Ptr Packed) (Ptr ty)
    where getField = fromPtr (Proxy @"unwrapPacked")
instance HasCField Packed "unwrapPacked"
    where type CFieldType Packed "unwrapPacked" = CUChar
          offset# = \_ -> \_ -> 0
{-| __C declaration:__ @PACKED_A@

    __defined at:__ @types\/enums\/enums.h 27:5@

    __exported by:__ @types\/enums\/enums.h@
-}
pattern PACKED_A :: Packed
{-| __C declaration:__ @PACKED_A@

    __defined at:__ @types\/enums\/enums.h 27:5@

    __exported by:__ @types\/enums\/enums.h@
-}
pattern PACKED_A = Packed 0
{-| __C declaration:__ @PACKED_B@

    __defined at:__ @types\/enums\/enums.h 27:15@

    __exported by:__ @types\/enums\/enums.h@
-}
pattern PACKED_B :: Packed
{-| __C declaration:__ @PACKED_B@

    __defined at:__ @types\/enums\/enums.h 27:15@

    __exported by:__ @types\/enums\/enums.h@
-}
pattern PACKED_B = Packed 1
{-| __C declaration:__ @PACKED_C@

    __defined at:__ @types\/enums\/enums.h 27:25@

    __exported by:__ @types\/enums\/enums.h@
-}
pattern PACKED_C :: Packed
{-| __C declaration:__ @PACKED_C@

    __defined at:__ @types\/enums\/enums.h 27:25@

    __exported by:__ @types\/enums\/enums.h@
-}
pattern PACKED_C = Packed 2
{-| __C declaration:__ @enum enumA@

    __defined at:__ @types\/enums\/enums.h 30:9@

    __exported by:__ @types\/enums\/enums.h@
-}
newtype EnumA
    = EnumA {unwrapEnumA :: CUInt}
      {- ^ __C declaration:__ @enum enumA@

           __defined at:__ @types\/enums\/enums.h 30:9@

           __exported by:__ @types\/enums\/enums.h@
      -}
    deriving stock (Eq, Ord)
    deriving newtype HasFFIType
instance StaticSize EnumA
    where staticSizeOf = \_ -> 4 :: Int
          staticAlignment = \_ -> 4 :: Int
instance ReadRaw EnumA
    where readRaw = \ptr_0 -> pure EnumA <*> readRawByteOff ptr_0 (0 :: Int)
instance WriteRaw EnumA
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       EnumA unwrapEnumA_2 -> writeRawByteOff ptr_0 (0 :: Int) unwrapEnumA_2
deriving via (EquivStorable EnumA) instance Storable EnumA
deriving via CUInt instance Prim EnumA
instance CEnum EnumA
    where type CEnumZ EnumA = CUInt
          toCEnum = EnumA
          fromCEnum = unwrapEnumA
          declaredValues = \_ -> declaredValuesFromList [(0,
                                                          singleton "A_FOO"),
                                                         (1, singleton "A_BAR")]
          showsUndeclared = showsWrappedUndeclared "EnumA"
          readPrecUndeclared = readPrecWrappedUndeclared "EnumA"
          isDeclared = seqIsDeclared
          mkDeclared = seqMkDeclared
instance SequentialCEnum EnumA
    where minDeclaredValue = A_FOO
          maxDeclaredValue = A_BAR
instance Show EnumA
    where showsPrec = shows
instance Read EnumA
    where readPrec = readPrec
          readList = readListDefault
          readListPrec = readListPrecDefault
instance TyEq ty (CFieldType EnumA "unwrapEnumA") =>
         HasField "unwrapEnumA" (Ptr EnumA) (Ptr ty)
    where getField = fromPtr (Proxy @"unwrapEnumA")
instance HasCField EnumA "unwrapEnumA"
    where type CFieldType EnumA "unwrapEnumA" = CUInt
          offset# = \_ -> \_ -> 0
{-| __C declaration:__ @A_FOO@

    __defined at:__ @types\/enums\/enums.h 30:16@

    __exported by:__ @types\/enums\/enums.h@
-}
pattern A_FOO :: EnumA
{-| __C declaration:__ @A_FOO@

    __defined at:__ @types\/enums\/enums.h 30:16@

    __exported by:__ @types\/enums\/enums.h@
-}
pattern A_FOO = EnumA 0
{-| __C declaration:__ @A_BAR@

    __defined at:__ @types\/enums\/enums.h 30:23@

    __exported by:__ @types\/enums\/enums.h@
-}
pattern A_BAR :: EnumA
{-| __C declaration:__ @A_BAR@

    __defined at:__ @types\/enums\/enums.h 30:23@

    __exported by:__ @types\/enums\/enums.h@
-}
pattern A_BAR = EnumA 1
{-| __C declaration:__ @enum enumB@

    __defined at:__ @types\/enums\/enums.h 32:14@

    __exported by:__ @types\/enums\/enums.h@
-}
newtype EnumB
    = EnumB {unwrapEnumB :: CUInt}
      {- ^ __C declaration:__ @enum enumB@

           __defined at:__ @types\/enums\/enums.h 32:14@

           __exported by:__ @types\/enums\/enums.h@
      -}
    deriving stock (Eq, Ord)
    deriving newtype HasFFIType
instance StaticSize EnumB
    where staticSizeOf = \_ -> 4 :: Int
          staticAlignment = \_ -> 4 :: Int
instance ReadRaw EnumB
    where readRaw = \ptr_0 -> pure EnumB <*> readRawByteOff ptr_0 (0 :: Int)
instance WriteRaw EnumB
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       EnumB unwrapEnumB_2 -> writeRawByteOff ptr_0 (0 :: Int) unwrapEnumB_2
deriving via (EquivStorable EnumB) instance Storable EnumB
deriving via CUInt instance Prim EnumB
instance CEnum EnumB
    where type CEnumZ EnumB = CUInt
          toCEnum = EnumB
          fromCEnum = unwrapEnumB
          declaredValues = \_ -> declaredValuesFromList [(0,
                                                          singleton "B_FOO"),
                                                         (1, singleton "B_BAR")]
          showsUndeclared = showsWrappedUndeclared "EnumB"
          readPrecUndeclared = readPrecWrappedUndeclared "EnumB"
          isDeclared = seqIsDeclared
          mkDeclared = seqMkDeclared
instance SequentialCEnum EnumB
    where minDeclaredValue = B_FOO
          maxDeclaredValue = B_BAR
instance Show EnumB
    where showsPrec = shows
instance Read EnumB
    where readPrec = readPrec
          readList = readListDefault
          readListPrec = readListPrecDefault
instance TyEq ty (CFieldType EnumB "unwrapEnumB") =>
         HasField "unwrapEnumB" (Ptr EnumB) (Ptr ty)
    where getField = fromPtr (Proxy @"unwrapEnumB")
instance HasCField EnumB "unwrapEnumB"
    where type CFieldType EnumB "unwrapEnumB" = CUInt
          offset# = \_ -> \_ -> 0
{-| __C declaration:__ @B_FOO@

    __defined at:__ @types\/enums\/enums.h 32:22@

    __exported by:__ @types\/enums\/enums.h@
-}
pattern B_FOO :: EnumB
{-| __C declaration:__ @B_FOO@

    __defined at:__ @types\/enums\/enums.h 32:22@

    __exported by:__ @types\/enums\/enums.h@
-}
pattern B_FOO = EnumB 0
{-| __C declaration:__ @B_BAR@

    __defined at:__ @types\/enums\/enums.h 32:29@

    __exported by:__ @types\/enums\/enums.h@
-}
pattern B_BAR :: EnumB
{-| __C declaration:__ @B_BAR@

    __defined at:__ @types\/enums\/enums.h 32:29@

    __exported by:__ @types\/enums\/enums.h@
-}
pattern B_BAR = EnumB 1
{-| __C declaration:__ @enum enumC@

    __defined at:__ @types\/enums\/enums.h 34:6@

    __exported by:__ @types\/enums\/enums.h@
-}
newtype EnumC
    = EnumC {unwrapEnumC :: CUInt}
      {- ^ __C declaration:__ @enum enumC@

           __defined at:__ @types\/enums\/enums.h 34:6@

           __exported by:__ @types\/enums\/enums.h@
      -}
    deriving stock (Eq, Ord)
    deriving newtype HasFFIType
instance StaticSize EnumC
    where staticSizeOf = \_ -> 4 :: Int
          staticAlignment = \_ -> 4 :: Int
instance ReadRaw EnumC
    where readRaw = \ptr_0 -> pure EnumC <*> readRawByteOff ptr_0 (0 :: Int)
instance WriteRaw EnumC
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       EnumC unwrapEnumC_2 -> writeRawByteOff ptr_0 (0 :: Int) unwrapEnumC_2
deriving via (EquivStorable EnumC) instance Storable EnumC
deriving via CUInt instance Prim EnumC
instance CEnum EnumC
    where type CEnumZ EnumC = CUInt
          toCEnum = EnumC
          fromCEnum = unwrapEnumC
          declaredValues = \_ -> declaredValuesFromList [(0,
                                                          singleton "C_FOO"),
                                                         (1, singleton "C_BAR")]
          showsUndeclared = showsWrappedUndeclared "EnumC"
          readPrecUndeclared = readPrecWrappedUndeclared "EnumC"
          isDeclared = seqIsDeclared
          mkDeclared = seqMkDeclared
instance SequentialCEnum EnumC
    where minDeclaredValue = C_FOO
          maxDeclaredValue = C_BAR
instance Show EnumC
    where showsPrec = shows
instance Read EnumC
    where readPrec = readPrec
          readList = readListDefault
          readListPrec = readListPrecDefault
instance TyEq ty (CFieldType EnumC "unwrapEnumC") =>
         HasField "unwrapEnumC" (Ptr EnumC) (Ptr ty)
    where getField = fromPtr (Proxy @"unwrapEnumC")
instance HasCField EnumC "unwrapEnumC"
    where type CFieldType EnumC "unwrapEnumC" = CUInt
          offset# = \_ -> \_ -> 0
{-| __C declaration:__ @C_FOO@

    __defined at:__ @types\/enums\/enums.h 34:14@

    __exported by:__ @types\/enums\/enums.h@
-}
pattern C_FOO :: EnumC
{-| __C declaration:__ @C_FOO@

    __defined at:__ @types\/enums\/enums.h 34:14@

    __exported by:__ @types\/enums\/enums.h@
-}
pattern C_FOO = EnumC 0
{-| __C declaration:__ @C_BAR@

    __defined at:__ @types\/enums\/enums.h 34:21@

    __exported by:__ @types\/enums\/enums.h@
-}
pattern C_BAR :: EnumC
{-| __C declaration:__ @C_BAR@

    __defined at:__ @types\/enums\/enums.h 34:21@

    __exported by:__ @types\/enums\/enums.h@
-}
pattern C_BAR = EnumC 1
{-| __C declaration:__ @enum enumD@

    __defined at:__ @types\/enums\/enums.h 37:6@

    __exported by:__ @types\/enums\/enums.h@
-}
newtype EnumD_t
    = EnumD_t {unwrapEnumD_t :: CUInt}
      {- ^ __C declaration:__ @enum enumD@

           __defined at:__ @types\/enums\/enums.h 37:6@

           __exported by:__ @types\/enums\/enums.h@
      -}
    deriving stock (Eq, Ord)
    deriving newtype HasFFIType
instance StaticSize EnumD_t
    where staticSizeOf = \_ -> 4 :: Int
          staticAlignment = \_ -> 4 :: Int
instance ReadRaw EnumD_t
    where readRaw = \ptr_0 -> pure EnumD_t <*> readRawByteOff ptr_0 (0 :: Int)
instance WriteRaw EnumD_t
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       EnumD_t unwrapEnumD_t_2 -> writeRawByteOff ptr_0 (0 :: Int) unwrapEnumD_t_2
deriving via (EquivStorable EnumD_t) instance Storable EnumD_t
deriving via CUInt instance Prim EnumD_t
instance CEnum EnumD_t
    where type CEnumZ EnumD_t = CUInt
          toCEnum = EnumD_t
          fromCEnum = unwrapEnumD_t
          declaredValues = \_ -> declaredValuesFromList [(0,
                                                          singleton "D_FOO"),
                                                         (1, singleton "D_BAR")]
          showsUndeclared = showsWrappedUndeclared "EnumD_t"
          readPrecUndeclared = readPrecWrappedUndeclared "EnumD_t"
          isDeclared = seqIsDeclared
          mkDeclared = seqMkDeclared
instance SequentialCEnum EnumD_t
    where minDeclaredValue = D_FOO
          maxDeclaredValue = D_BAR
instance Show EnumD_t
    where showsPrec = shows
instance Read EnumD_t
    where readPrec = readPrec
          readList = readListDefault
          readListPrec = readListPrecDefault
instance TyEq ty (CFieldType EnumD_t "unwrapEnumD_t") =>
         HasField "unwrapEnumD_t" (Ptr EnumD_t) (Ptr ty)
    where getField = fromPtr (Proxy @"unwrapEnumD_t")
instance HasCField EnumD_t "unwrapEnumD_t"
    where type CFieldType EnumD_t "unwrapEnumD_t" = CUInt
          offset# = \_ -> \_ -> 0
{-| __C declaration:__ @D_FOO@

    __defined at:__ @types\/enums\/enums.h 37:14@

    __exported by:__ @types\/enums\/enums.h@
-}
pattern D_FOO :: EnumD_t
{-| __C declaration:__ @D_FOO@

    __defined at:__ @types\/enums\/enums.h 37:14@

    __exported by:__ @types\/enums\/enums.h@
-}
pattern D_FOO = EnumD_t 0
{-| __C declaration:__ @D_BAR@

    __defined at:__ @types\/enums\/enums.h 37:21@

    __exported by:__ @types\/enums\/enums.h@
-}
pattern D_BAR :: EnumD_t
{-| __C declaration:__ @D_BAR@

    __defined at:__ @types\/enums\/enums.h 37:21@

    __exported by:__ @types\/enums\/enums.h@
-}
pattern D_BAR = EnumD_t 1
