packages feed

hs-bindgen-1.0.0.0: test-artefacts/fixtures/macros/wrong_source_location/th.txt

-- addDependentFile test-artefacts/headers/golden/macros/wrong_source_location.h
{-| __C declaration:__ @struct \@UU1_fieldY@

    __defined at:__ @macros\/wrong_source_location.h 19:1@

    __exported by:__ @macros\/wrong_source_location.h@
-}
data UU1_fieldY
    = UU1_fieldY {uU1_fieldY_fieldX :: CInt
                  {- ^ __C declaration:__ @fieldX@

                       __defined at:__ @macros\/wrong_source_location.h 19:1@

                       __exported by:__ @macros\/wrong_source_location.h@
                  -}}
    deriving stock (Eq, Generic, Show)
instance StaticSize UU1_fieldY
    where staticSizeOf = \_ -> 4 :: Int
          staticAlignment = \_ -> 4 :: Int
instance ReadRaw UU1_fieldY
    where readRaw = \ptr_0 -> pure UU1_fieldY <*> readRaw (Proxy @"uU1_fieldY_fieldX") ptr_0
instance WriteRaw UU1_fieldY
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       UU1_fieldY uU1_fieldY_fieldX_2 -> writeRaw (Proxy @"uU1_fieldY_fieldX") ptr_0 uU1_fieldY_fieldX_2
deriving via (EquivStorable UU1_fieldY) instance Storable UU1_fieldY
deriving via (IsStructViaReadRaw UU1_fieldY) instance IsStruct UU1_fieldY
instance (~) ty CInt => HasField "uU1_fieldY_fieldX" UU1_fieldY ty
    where hasField = \x_0 -> (\y_1 -> UU1_fieldY{uU1_fieldY_fieldX = y_1},
                              getField @"uU1_fieldY_fieldX" x_0)
instance (~) ty CInt =>
         HasField "uU1_fieldY_fieldX" (Ptr UU1_fieldY) (Ptr ty)
    where getField = fromPtr (Proxy @"uU1_fieldY_fieldX")
instance HasCField UU1_fieldY "uU1_fieldY_fieldX"
    where type CFieldType UU1_fieldY "uU1_fieldY_fieldX" = CInt
          offset# = \_ -> \_ -> 0
{-| __C declaration:__ @struct UU1@

    __defined at:__ @macros\/wrong_source_location.h 19:1@

    __exported by:__ @macros\/wrong_source_location.h@
-}
data UU1
    = UU1 {uU1_fieldY :: UU1_fieldY
           {- ^ __C declaration:__ @fieldY@

                __defined at:__ @macros\/wrong_source_location.h 19:1@

                __exported by:__ @macros\/wrong_source_location.h@
           -}}
    deriving stock (Eq, Generic, Show)
instance StaticSize UU1
    where staticSizeOf = \_ -> 4 :: Int
          staticAlignment = \_ -> 4 :: Int
instance ReadRaw UU1
    where readRaw = \ptr_0 -> pure UU1 <*> readRaw (Proxy @"uU1_fieldY") ptr_0
instance WriteRaw UU1
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       UU1 uU1_fieldY_2 -> writeRaw (Proxy @"uU1_fieldY") ptr_0 uU1_fieldY_2
deriving via (EquivStorable UU1) instance Storable UU1
deriving via (IsStructViaReadRaw UU1) instance IsStruct UU1
instance (~) ty UU1_fieldY => HasField "uU1_fieldY" UU1 ty
    where hasField = \x_0 -> (\y_1 -> UU1{uU1_fieldY = y_1},
                              getField @"uU1_fieldY" x_0)
instance (~) ty UU1_fieldY =>
         HasField "uU1_fieldY" (Ptr UU1) (Ptr ty)
    where getField = fromPtr (Proxy @"uU1_fieldY")
instance HasCField UU1 "uU1_fieldY"
    where type CFieldType UU1 "uU1_fieldY" = UU1_fieldY
          offset# = \_ -> \_ -> 0
{-| __C declaration:__ @struct \@UU2_fieldY@

    __defined at:__ @macros\/wrong_source_location.h 21:1@

    __exported by:__ @macros\/wrong_source_location.h@
-}
data UU2_fieldY
    = UU2_fieldY {uU2_fieldY_fieldX :: CInt
                  {- ^ __C declaration:__ @fieldX@

                       __defined at:__ @macros\/wrong_source_location.h 21:1@

                       __exported by:__ @macros\/wrong_source_location.h@
                  -}}
    deriving stock (Eq, Generic, Show)
instance StaticSize UU2_fieldY
    where staticSizeOf = \_ -> 4 :: Int
          staticAlignment = \_ -> 4 :: Int
instance ReadRaw UU2_fieldY
    where readRaw = \ptr_0 -> pure UU2_fieldY <*> readRaw (Proxy @"uU2_fieldY_fieldX") ptr_0
instance WriteRaw UU2_fieldY
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       UU2_fieldY uU2_fieldY_fieldX_2 -> writeRaw (Proxy @"uU2_fieldY_fieldX") ptr_0 uU2_fieldY_fieldX_2
deriving via (EquivStorable UU2_fieldY) instance Storable UU2_fieldY
deriving via (IsStructViaReadRaw UU2_fieldY) instance IsStruct UU2_fieldY
instance (~) ty CInt => HasField "uU2_fieldY_fieldX" UU2_fieldY ty
    where hasField = \x_0 -> (\y_1 -> UU2_fieldY{uU2_fieldY_fieldX = y_1},
                              getField @"uU2_fieldY_fieldX" x_0)
instance (~) ty CInt =>
         HasField "uU2_fieldY_fieldX" (Ptr UU2_fieldY) (Ptr ty)
    where getField = fromPtr (Proxy @"uU2_fieldY_fieldX")
instance HasCField UU2_fieldY "uU2_fieldY_fieldX"
    where type CFieldType UU2_fieldY "uU2_fieldY_fieldX" = CInt
          offset# = \_ -> \_ -> 0
{-| __C declaration:__ @struct UU2@

    __defined at:__ @macros\/wrong_source_location.h 21:1@

    __exported by:__ @macros\/wrong_source_location.h@
-}
data UU2
    = UU2 {uU2_fieldY :: UU2_fieldY
           {- ^ __C declaration:__ @fieldY@

                __defined at:__ @macros\/wrong_source_location.h 21:1@

                __exported by:__ @macros\/wrong_source_location.h@
           -}}
    deriving stock (Eq, Generic, Show)
instance StaticSize UU2
    where staticSizeOf = \_ -> 4 :: Int
          staticAlignment = \_ -> 4 :: Int
instance ReadRaw UU2
    where readRaw = \ptr_0 -> pure UU2 <*> readRaw (Proxy @"uU2_fieldY") ptr_0
instance WriteRaw UU2
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       UU2 uU2_fieldY_2 -> writeRaw (Proxy @"uU2_fieldY") ptr_0 uU2_fieldY_2
deriving via (EquivStorable UU2) instance Storable UU2
deriving via (IsStructViaReadRaw UU2) instance IsStruct UU2
instance (~) ty UU2_fieldY => HasField "uU2_fieldY" UU2 ty
    where hasField = \x_0 -> (\y_1 -> UU2{uU2_fieldY = y_1},
                              getField @"uU2_fieldY" x_0)
instance (~) ty UU2_fieldY =>
         HasField "uU2_fieldY" (Ptr UU2) (Ptr ty)
    where getField = fromPtr (Proxy @"uU2_fieldY")
instance HasCField UU2 "uU2_fieldY"
    where type CFieldType UU2 "uU2_fieldY" = UU2_fieldY
          offset# = \_ -> \_ -> 0
{-| __C declaration:__ @struct \@VV1_fieldA@

    __defined at:__ @macros\/wrong_source_location.h 29:1@

    __exported by:__ @macros\/wrong_source_location.h@
-}
data VV1_fieldA
    = VV1_fieldA {vV1_fieldA_a :: CInt
                  {- ^ __C declaration:__ @a@

                       __defined at:__ @macros\/wrong_source_location.h 29:1@

                       __exported by:__ @macros\/wrong_source_location.h@
                  -}}
    deriving stock (Eq, Generic, Show)
instance StaticSize VV1_fieldA
    where staticSizeOf = \_ -> 4 :: Int
          staticAlignment = \_ -> 4 :: Int
instance ReadRaw VV1_fieldA
    where readRaw = \ptr_0 -> pure VV1_fieldA <*> readRaw (Proxy @"vV1_fieldA_a") ptr_0
instance WriteRaw VV1_fieldA
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       VV1_fieldA vV1_fieldA_a_2 -> writeRaw (Proxy @"vV1_fieldA_a") ptr_0 vV1_fieldA_a_2
deriving via (EquivStorable VV1_fieldA) instance Storable VV1_fieldA
deriving via (IsStructViaReadRaw VV1_fieldA) instance IsStruct VV1_fieldA
instance (~) ty CInt => HasField "vV1_fieldA_a" VV1_fieldA ty
    where hasField = \x_0 -> (\y_1 -> VV1_fieldA{vV1_fieldA_a = y_1},
                              getField @"vV1_fieldA_a" x_0)
instance (~) ty CInt =>
         HasField "vV1_fieldA_a" (Ptr VV1_fieldA) (Ptr ty)
    where getField = fromPtr (Proxy @"vV1_fieldA_a")
instance HasCField VV1_fieldA "vV1_fieldA_a"
    where type CFieldType VV1_fieldA "vV1_fieldA_a" = CInt
          offset# = \_ -> \_ -> 0
{-| __C declaration:__ @struct \@VV1_fieldB@

    __defined at:__ @macros\/wrong_source_location.h 29:1@

    __exported by:__ @macros\/wrong_source_location.h@
-}
data VV1_fieldB
    = VV1_fieldB {vV1_fieldB_b :: CInt
                  {- ^ __C declaration:__ @b@

                       __defined at:__ @macros\/wrong_source_location.h 29:1@

                       __exported by:__ @macros\/wrong_source_location.h@
                  -}}
    deriving stock (Eq, Generic, Show)
instance StaticSize VV1_fieldB
    where staticSizeOf = \_ -> 4 :: Int
          staticAlignment = \_ -> 4 :: Int
instance ReadRaw VV1_fieldB
    where readRaw = \ptr_0 -> pure VV1_fieldB <*> readRaw (Proxy @"vV1_fieldB_b") ptr_0
instance WriteRaw VV1_fieldB
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       VV1_fieldB vV1_fieldB_b_2 -> writeRaw (Proxy @"vV1_fieldB_b") ptr_0 vV1_fieldB_b_2
deriving via (EquivStorable VV1_fieldB) instance Storable VV1_fieldB
deriving via (IsStructViaReadRaw VV1_fieldB) instance IsStruct VV1_fieldB
instance (~) ty CInt => HasField "vV1_fieldB_b" VV1_fieldB ty
    where hasField = \x_0 -> (\y_1 -> VV1_fieldB{vV1_fieldB_b = y_1},
                              getField @"vV1_fieldB_b" x_0)
instance (~) ty CInt =>
         HasField "vV1_fieldB_b" (Ptr VV1_fieldB) (Ptr ty)
    where getField = fromPtr (Proxy @"vV1_fieldB_b")
instance HasCField VV1_fieldB "vV1_fieldB_b"
    where type CFieldType VV1_fieldB "vV1_fieldB_b" = CInt
          offset# = \_ -> \_ -> 0
{-| __C declaration:__ @struct VV1@

    __defined at:__ @macros\/wrong_source_location.h 29:1@

    __exported by:__ @macros\/wrong_source_location.h@
-}
data VV1
    = VV1 {vV1_fieldA :: VV1_fieldA
           {- ^ __C declaration:__ @fieldA@

                __defined at:__ @macros\/wrong_source_location.h 29:1@

                __exported by:__ @macros\/wrong_source_location.h@
           -},
           vV1_fieldB :: VV1_fieldB
           {- ^ __C declaration:__ @fieldB@

                __defined at:__ @macros\/wrong_source_location.h 29:1@

                __exported by:__ @macros\/wrong_source_location.h@
           -}}
    deriving stock (Eq, Generic, Show)
instance StaticSize VV1
    where staticSizeOf = \_ -> 8 :: Int
          staticAlignment = \_ -> 4 :: Int
instance ReadRaw VV1
    where readRaw = \ptr_0 -> (pure VV1 <*> readRaw (Proxy @"vV1_fieldA") ptr_0) <*> readRaw (Proxy @"vV1_fieldB") ptr_0
instance WriteRaw VV1
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       VV1 vV1_fieldA_2
                                           vV1_fieldB_3 -> writeRaw (Proxy @"vV1_fieldA") ptr_0 vV1_fieldA_2 >> writeRaw (Proxy @"vV1_fieldB") ptr_0 vV1_fieldB_3
deriving via (EquivStorable VV1) instance Storable VV1
deriving via (IsStructViaReadRaw VV1) instance IsStruct VV1
instance (~) ty VV1_fieldA => HasField "vV1_fieldA" VV1 ty
    where hasField = \x_0 -> (\y_1 -> VV1{vV1_fieldA = y_1,
                                          vV1_fieldB = getField @"vV1_fieldB" x_0},
                              getField @"vV1_fieldA" x_0)
instance (~) ty VV1_fieldA =>
         HasField "vV1_fieldA" (Ptr VV1) (Ptr ty)
    where getField = fromPtr (Proxy @"vV1_fieldA")
instance HasCField VV1 "vV1_fieldA"
    where type CFieldType VV1 "vV1_fieldA" = VV1_fieldA
          offset# = \_ -> \_ -> 0
instance (~) ty VV1_fieldB => HasField "vV1_fieldB" VV1 ty
    where hasField = \x_0 -> (\y_1 -> VV1{vV1_fieldB = y_1,
                                          vV1_fieldA = getField @"vV1_fieldA" x_0},
                              getField @"vV1_fieldB" x_0)
instance (~) ty VV1_fieldB =>
         HasField "vV1_fieldB" (Ptr VV1) (Ptr ty)
    where getField = fromPtr (Proxy @"vV1_fieldB")
instance HasCField VV1 "vV1_fieldB"
    where type CFieldType VV1 "vV1_fieldB" = VV1_fieldB
          offset# = \_ -> \_ -> 4
{-| __C declaration:__ @struct \@VV2_fieldA@

    __defined at:__ @macros\/wrong_source_location.h 31:1@

    __exported by:__ @macros\/wrong_source_location.h@
-}
data VV2_fieldA
    = VV2_fieldA {vV2_fieldA_a :: CInt
                  {- ^ __C declaration:__ @a@

                       __defined at:__ @macros\/wrong_source_location.h 31:1@

                       __exported by:__ @macros\/wrong_source_location.h@
                  -}}
    deriving stock (Eq, Generic, Show)
instance StaticSize VV2_fieldA
    where staticSizeOf = \_ -> 4 :: Int
          staticAlignment = \_ -> 4 :: Int
instance ReadRaw VV2_fieldA
    where readRaw = \ptr_0 -> pure VV2_fieldA <*> readRaw (Proxy @"vV2_fieldA_a") ptr_0
instance WriteRaw VV2_fieldA
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       VV2_fieldA vV2_fieldA_a_2 -> writeRaw (Proxy @"vV2_fieldA_a") ptr_0 vV2_fieldA_a_2
deriving via (EquivStorable VV2_fieldA) instance Storable VV2_fieldA
deriving via (IsStructViaReadRaw VV2_fieldA) instance IsStruct VV2_fieldA
instance (~) ty CInt => HasField "vV2_fieldA_a" VV2_fieldA ty
    where hasField = \x_0 -> (\y_1 -> VV2_fieldA{vV2_fieldA_a = y_1},
                              getField @"vV2_fieldA_a" x_0)
instance (~) ty CInt =>
         HasField "vV2_fieldA_a" (Ptr VV2_fieldA) (Ptr ty)
    where getField = fromPtr (Proxy @"vV2_fieldA_a")
instance HasCField VV2_fieldA "vV2_fieldA_a"
    where type CFieldType VV2_fieldA "vV2_fieldA_a" = CInt
          offset# = \_ -> \_ -> 0
{-| __C declaration:__ @struct \@VV2_fieldB@

    __defined at:__ @macros\/wrong_source_location.h 31:1@

    __exported by:__ @macros\/wrong_source_location.h@
-}
data VV2_fieldB
    = VV2_fieldB {vV2_fieldB_b :: CInt
                  {- ^ __C declaration:__ @b@

                       __defined at:__ @macros\/wrong_source_location.h 31:1@

                       __exported by:__ @macros\/wrong_source_location.h@
                  -}}
    deriving stock (Eq, Generic, Show)
instance StaticSize VV2_fieldB
    where staticSizeOf = \_ -> 4 :: Int
          staticAlignment = \_ -> 4 :: Int
instance ReadRaw VV2_fieldB
    where readRaw = \ptr_0 -> pure VV2_fieldB <*> readRaw (Proxy @"vV2_fieldB_b") ptr_0
instance WriteRaw VV2_fieldB
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       VV2_fieldB vV2_fieldB_b_2 -> writeRaw (Proxy @"vV2_fieldB_b") ptr_0 vV2_fieldB_b_2
deriving via (EquivStorable VV2_fieldB) instance Storable VV2_fieldB
deriving via (IsStructViaReadRaw VV2_fieldB) instance IsStruct VV2_fieldB
instance (~) ty CInt => HasField "vV2_fieldB_b" VV2_fieldB ty
    where hasField = \x_0 -> (\y_1 -> VV2_fieldB{vV2_fieldB_b = y_1},
                              getField @"vV2_fieldB_b" x_0)
instance (~) ty CInt =>
         HasField "vV2_fieldB_b" (Ptr VV2_fieldB) (Ptr ty)
    where getField = fromPtr (Proxy @"vV2_fieldB_b")
instance HasCField VV2_fieldB "vV2_fieldB_b"
    where type CFieldType VV2_fieldB "vV2_fieldB_b" = CInt
          offset# = \_ -> \_ -> 0
{-| __C declaration:__ @struct VV2@

    __defined at:__ @macros\/wrong_source_location.h 31:1@

    __exported by:__ @macros\/wrong_source_location.h@
-}
data VV2
    = VV2 {vV2_fieldA :: VV2_fieldA
           {- ^ __C declaration:__ @fieldA@

                __defined at:__ @macros\/wrong_source_location.h 31:1@

                __exported by:__ @macros\/wrong_source_location.h@
           -},
           vV2_fieldB :: VV2_fieldB
           {- ^ __C declaration:__ @fieldB@

                __defined at:__ @macros\/wrong_source_location.h 31:1@

                __exported by:__ @macros\/wrong_source_location.h@
           -}}
    deriving stock (Eq, Generic, Show)
instance StaticSize VV2
    where staticSizeOf = \_ -> 8 :: Int
          staticAlignment = \_ -> 4 :: Int
instance ReadRaw VV2
    where readRaw = \ptr_0 -> (pure VV2 <*> readRaw (Proxy @"vV2_fieldA") ptr_0) <*> readRaw (Proxy @"vV2_fieldB") ptr_0
instance WriteRaw VV2
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       VV2 vV2_fieldA_2
                                           vV2_fieldB_3 -> writeRaw (Proxy @"vV2_fieldA") ptr_0 vV2_fieldA_2 >> writeRaw (Proxy @"vV2_fieldB") ptr_0 vV2_fieldB_3
deriving via (EquivStorable VV2) instance Storable VV2
deriving via (IsStructViaReadRaw VV2) instance IsStruct VV2
instance (~) ty VV2_fieldA => HasField "vV2_fieldA" VV2 ty
    where hasField = \x_0 -> (\y_1 -> VV2{vV2_fieldA = y_1,
                                          vV2_fieldB = getField @"vV2_fieldB" x_0},
                              getField @"vV2_fieldA" x_0)
instance (~) ty VV2_fieldA =>
         HasField "vV2_fieldA" (Ptr VV2) (Ptr ty)
    where getField = fromPtr (Proxy @"vV2_fieldA")
instance HasCField VV2 "vV2_fieldA"
    where type CFieldType VV2 "vV2_fieldA" = VV2_fieldA
          offset# = \_ -> \_ -> 0
instance (~) ty VV2_fieldB => HasField "vV2_fieldB" VV2 ty
    where hasField = \x_0 -> (\y_1 -> VV2{vV2_fieldB = y_1,
                                          vV2_fieldA = getField @"vV2_fieldA" x_0},
                              getField @"vV2_fieldB" x_0)
instance (~) ty VV2_fieldB =>
         HasField "vV2_fieldB" (Ptr VV2) (Ptr ty)
    where getField = fromPtr (Proxy @"vV2_fieldB")
instance HasCField VV2 "vV2_fieldB"
    where type CFieldType VV2 "vV2_fieldB" = VV2_fieldB
          offset# = \_ -> \_ -> 4