hs-bindgen-1.0.0.0: test-artefacts/fixtures/macros/reparse/nesting/union_in_variable.2.raw/th.txt
-- addDependentFile test-artefacts/headers/golden/macros/reparse/nesting/union_in_variable.h
-- #include <macros/reparse/nesting/union_in_variable.h>
-- /* test_macrosreparsenestingunion_i_Example_get_G1 */
-- __attribute__ ((const))
-- void *hs_bindgen_4b01ee4d60407c60 (void)
-- {
-- return &G1;
-- }
-- /* test_macrosreparsenestingunion_i_Example_get_G2 */
-- __attribute__ ((const))
-- void *hs_bindgen_2290f6729b2485e1 (void)
-- {
-- return &G2;
-- }
-- /* test_macrosreparsenestingunion_i_Example_get_G3 */
-- __attribute__ ((const))
-- void *hs_bindgen_1be42b84691d63f3 (void)
-- {
-- return &G3;
-- }
{-| __C declaration:__ @macro MyInt@
__defined at:__ @macros\/reparse\/nesting\/union_in_variable.h 1:9@
__exported by:__ @macros\/reparse\/nesting\/union_in_variable.h@
-}
myInt :: Raw String
{-| __C declaration:__ @macro MyInt@
__defined at:__ @macros\/reparse\/nesting\/union_in_variable.h 1:9@
__exported by:__ @macros\/reparse\/nesting\/union_in_variable.h@
-}
myInt = objectLike "MyInt" ["int"]
{-| __C declaration:__ @union \@G1@
__defined at:__ @macros\/reparse\/nesting\/union_in_variable.h 3:1@
__exported by:__ @macros\/reparse\/nesting\/union_in_variable.h@
-}
newtype G1 = G1 {unwrapG1 :: ByteArray} deriving stock Generic
deriving via (SizedByteArray 4 4) instance StaticSize G1
deriving via (SizedByteArray 4 4) instance ReadRaw G1
deriving via (SizedByteArray 4 4) instance WriteRaw G1
deriving via (EquivStorable G1) instance Storable G1
deriving via (SizedByteArray 4 4) instance IsUnion G1
instance (~) ty CInt => HasField "g1_x" G1 ty
where getField = getUnionPayload
instance (~) ty CInt => HasField "g1_x" G1 ty
where hasField = \x_0 -> (\y_1 -> setUnionPayload y_1 x_0,
getField @"g1_x" x_0)
instance (~) ty CInt => HasField "g1_x" (Ptr G1) (Ptr ty)
where getField = fromPtr (Proxy @"g1_x")
instance HasCField G1 "g1_x"
where type CFieldType G1 "g1_x" = CInt
offset# = \_ -> \_ -> 0
{-| __C declaration:__ @union \@G2@
__defined at:__ @macros\/reparse\/nesting\/union_in_variable.h 4:1@
__exported by:__ @macros\/reparse\/nesting\/union_in_variable.h@
-}
newtype G2 = G2 {unwrapG2 :: ByteArray} deriving stock Generic
deriving via (SizedByteArray 4 4) instance StaticSize G2
deriving via (SizedByteArray 4 4) instance ReadRaw G2
deriving via (SizedByteArray 4 4) instance WriteRaw G2
deriving via (EquivStorable G2) instance Storable G2
deriving via (SizedByteArray 4 4) instance IsUnion G2
instance (~) ty CInt => HasField "g2_x" G2 ty
where getField = getUnionPayload
instance (~) ty CInt => HasField "g2_x" G2 ty
where hasField = \x_0 -> (\y_1 -> setUnionPayload y_1 x_0,
getField @"g2_x" x_0)
instance (~) ty CInt => HasField "g2_x" (Ptr G2) (Ptr ty)
where getField = fromPtr (Proxy @"g2_x")
instance HasCField G2 "g2_x"
where type CFieldType G2 "g2_x" = CInt
offset# = \_ -> \_ -> 0
{-| __C declaration:__ @union \@G3@
__defined at:__ @macros\/reparse\/nesting\/union_in_variable.h 5:1@
__exported by:__ @macros\/reparse\/nesting\/union_in_variable.h@
-}
newtype G3 = G3 {unwrapG3 :: ByteArray} deriving stock Generic
deriving via (SizedByteArray 4 4) instance StaticSize G3
deriving via (SizedByteArray 4 4) instance ReadRaw G3
deriving via (SizedByteArray 4 4) instance WriteRaw G3
deriving via (EquivStorable G3) instance Storable G3
deriving via (SizedByteArray 4 4) instance IsUnion G3
instance (~) ty CInt => HasField "g3_x" G3 ty
where getField = getUnionPayload
instance (~) ty CInt => HasField "g3_x" G3 ty
where hasField = \x_0 -> (\y_1 -> setUnionPayload y_1 x_0,
getField @"g3_x" x_0)
instance (~) ty CInt => HasField "g3_x" (Ptr G3) (Ptr ty)
where getField = fromPtr (Proxy @"g3_x")
instance HasCField G3 "g3_x"
where type CFieldType G3 "g3_x" = CInt
offset# = \_ -> \_ -> 0
-- __unique:__ @test_macrosreparsenestingunion_i_Example_get_G1@
foreign import ccall unsafe "hs_bindgen_4b01ee4d60407c60" hs_bindgen_4b01ee4d60407c60_base ::
IO (Ptr Void)
-- __unique:__ @test_macrosreparsenestingunion_i_Example_get_G1@
hs_bindgen_4b01ee4d60407c60 :: IO (Ptr G1)
-- __unique:__ @test_macrosreparsenestingunion_i_Example_get_G1@
hs_bindgen_4b01ee4d60407c60 = fmap fromFFIType hs_bindgen_4b01ee4d60407c60_base
{-# NOINLINE g1 #-}
{-| __C declaration:__ @G1@
__defined at:__ @macros\/reparse\/nesting\/union_in_variable.h 3:23@
__exported by:__ @macros\/reparse\/nesting\/union_in_variable.h@
-}
g1 :: Ptr G1
{-| __C declaration:__ @G1@
__defined at:__ @macros\/reparse\/nesting\/union_in_variable.h 3:23@
__exported by:__ @macros\/reparse\/nesting\/union_in_variable.h@
-}
g1 = unsafePerformIO hs_bindgen_4b01ee4d60407c60
-- __unique:__ @test_macrosreparsenestingunion_i_Example_get_G2@
foreign import ccall unsafe "hs_bindgen_2290f6729b2485e1" hs_bindgen_2290f6729b2485e1_base ::
IO (Ptr Void)
-- __unique:__ @test_macrosreparsenestingunion_i_Example_get_G2@
hs_bindgen_2290f6729b2485e1 :: IO (Ptr (Ptr G2))
-- __unique:__ @test_macrosreparsenestingunion_i_Example_get_G2@
hs_bindgen_2290f6729b2485e1 = fmap fromFFIType hs_bindgen_2290f6729b2485e1_base
{-# NOINLINE g2 #-}
{-| __C declaration:__ @G2@
__defined at:__ @macros\/reparse\/nesting\/union_in_variable.h 4:23@
__exported by:__ @macros\/reparse\/nesting\/union_in_variable.h@
-}
g2 :: Ptr (Ptr G2)
{-| __C declaration:__ @G2@
__defined at:__ @macros\/reparse\/nesting\/union_in_variable.h 4:23@
__exported by:__ @macros\/reparse\/nesting\/union_in_variable.h@
-}
g2 = unsafePerformIO hs_bindgen_2290f6729b2485e1
-- __unique:__ @test_macrosreparsenestingunion_i_Example_get_G3@
foreign import ccall unsafe "hs_bindgen_1be42b84691d63f3" hs_bindgen_1be42b84691d63f3_base ::
IO (Ptr Void)
-- __unique:__ @test_macrosreparsenestingunion_i_Example_get_G3@
hs_bindgen_1be42b84691d63f3 :: IO (Ptr (Ptr (Ptr G3)))
-- __unique:__ @test_macrosreparsenestingunion_i_Example_get_G3@
hs_bindgen_1be42b84691d63f3 = fmap fromFFIType hs_bindgen_1be42b84691d63f3_base
{-# NOINLINE g3 #-}
{-| __C declaration:__ @G3@
__defined at:__ @macros\/reparse\/nesting\/union_in_variable.h 5:23@
__exported by:__ @macros\/reparse\/nesting\/union_in_variable.h@
-}
g3 :: Ptr (Ptr (Ptr G3))
{-| __C declaration:__ @G3@
__defined at:__ @macros\/reparse\/nesting\/union_in_variable.h 5:23@
__exported by:__ @macros\/reparse\/nesting\/union_in_variable.h@
-}
g3 = unsafePerformIO hs_bindgen_1be42b84691d63f3