packages feed

hs-bindgen-1.0.0.0: test-artefacts/fixtures/program-analysis/selection_matches_c_names.1.positive_case/th.txt

-- addDependentFile test-artefacts/headers/golden/program-analysis/selection_matches_c_names.h
-- #include <program-analysis/selection_matches_c_names.h>
-- signed int hs_bindgen_c9b1dc5577fd8ced (void)
-- {
--   return (FunctionWithAssignedHaskellNameByNameMangler)();
-- }
-- signed int hs_bindgen_9a13a53e6a2f2416 (void)
-- {
--   return (FunctionWithAssignedHaskellNameByNameMangler)();
-- }
-- /* test_programanalysisselection_mat_Example_get_FunctionWithAssignedHaskellNameByNameMangler */
-- __attribute__ ((const))
-- signed int (*hs_bindgen_1ccc97a484f823b2 (void)) (void)
-- {
--   return &FunctionWithAssignedHaskellNameByNameMangler;
-- }
{-| __C declaration:__ @struct StructWithAssignedHaskellNameByPrescriptiveBindingSpecs@

    __defined at:__ @program-analysis\/selection_matches_c_names.h 7:8@

    __exported by:__ @program-analysis\/selection_matches_c_names.h@
-}
data NewName
    = NewName {newName_x :: CInt
               {- ^ __C declaration:__ @x@

                    __defined at:__ @program-analysis\/selection_matches_c_names.h 8:7@

                    __exported by:__ @program-analysis\/selection_matches_c_names.h@
               -}}
    deriving stock (Eq, Generic, Show)
instance StaticSize NewName
    where staticSizeOf = \_ -> 4 :: Int
          staticAlignment = \_ -> 4 :: Int
instance ReadRaw NewName
    where readRaw = \ptr_0 -> pure NewName <*> readRaw (Proxy @"newName_x") ptr_0
instance WriteRaw NewName
    where writeRaw = \ptr_0 -> \s_1 -> case s_1 of
                                       NewName newName_x_2 -> writeRaw (Proxy @"newName_x") ptr_0 newName_x_2
deriving via (EquivStorable NewName) instance Storable NewName
deriving via (IsStructViaReadRaw NewName) instance IsStruct NewName
instance (~) ty CInt => HasField "newName_x" NewName ty
    where hasField = \x_0 -> (\y_1 -> NewName{newName_x = y_1},
                              getField @"newName_x" x_0)
instance (~) ty CInt => HasField "newName_x" (Ptr NewName) (Ptr ty)
    where getField = fromPtr (Proxy @"newName_x")
instance HasCField NewName "newName_x"
    where type CFieldType NewName "newName_x" = CInt
          offset# = \_ -> \_ -> 0
-- __unique:__ @test_programanalysisselection_mat_Example_Safe_FunctionWithAssignedHaskellNameByNameMangler@
foreign import ccall safe "hs_bindgen_c9b1dc5577fd8ced" hs_bindgen_c9b1dc5577fd8ced_base ::
    IO CInt
-- __unique:__ @test_programanalysisselection_mat_Example_Safe_FunctionWithAssignedHaskellNameByNameMangler@
hs_bindgen_c9b1dc5577fd8ced :: IO CInt
-- __unique:__ @test_programanalysisselection_mat_Example_Safe_FunctionWithAssignedHaskellNameByNameMangler@
hs_bindgen_c9b1dc5577fd8ced = fmap fromFFIType hs_bindgen_c9b1dc5577fd8ced_base
{-| __C declaration:__ @FunctionWithAssignedHaskellNameByNameMangler@

    __defined at:__ @program-analysis\/selection_matches_c_names.h 5:5@

    __exported by:__ @program-analysis\/selection_matches_c_names.h@
-}
functionWithAssignedHaskellNameByNameMangler_safe :: IO CInt
{-| __C declaration:__ @FunctionWithAssignedHaskellNameByNameMangler@

    __defined at:__ @program-analysis\/selection_matches_c_names.h 5:5@

    __exported by:__ @program-analysis\/selection_matches_c_names.h@
-}
functionWithAssignedHaskellNameByNameMangler_safe = hs_bindgen_c9b1dc5577fd8ced
-- __unique:__ @test_programanalysisselection_mat_Example_Unsafe_FunctionWithAssignedHaskellNameByNameMangler@
foreign import ccall unsafe "hs_bindgen_9a13a53e6a2f2416" hs_bindgen_9a13a53e6a2f2416_base ::
    IO CInt
-- __unique:__ @test_programanalysisselection_mat_Example_Unsafe_FunctionWithAssignedHaskellNameByNameMangler@
hs_bindgen_9a13a53e6a2f2416 :: IO CInt
-- __unique:__ @test_programanalysisselection_mat_Example_Unsafe_FunctionWithAssignedHaskellNameByNameMangler@
hs_bindgen_9a13a53e6a2f2416 = fmap fromFFIType hs_bindgen_9a13a53e6a2f2416_base
{-| __C declaration:__ @FunctionWithAssignedHaskellNameByNameMangler@

    __defined at:__ @program-analysis\/selection_matches_c_names.h 5:5@

    __exported by:__ @program-analysis\/selection_matches_c_names.h@
-}
functionWithAssignedHaskellNameByNameMangler_unsafe :: IO CInt
{-| __C declaration:__ @FunctionWithAssignedHaskellNameByNameMangler@

    __defined at:__ @program-analysis\/selection_matches_c_names.h 5:5@

    __exported by:__ @program-analysis\/selection_matches_c_names.h@
-}
functionWithAssignedHaskellNameByNameMangler_unsafe = hs_bindgen_9a13a53e6a2f2416
-- __unique:__ @test_programanalysisselection_mat_Example_get_FunctionWithAssignedHaskellNameByNameMangler@
foreign import ccall unsafe "hs_bindgen_1ccc97a484f823b2" hs_bindgen_1ccc97a484f823b2_base ::
    IO (FunPtr Void)
-- __unique:__ @test_programanalysisselection_mat_Example_get_FunctionWithAssignedHaskellNameByNameMangler@
hs_bindgen_1ccc97a484f823b2 :: IO (FunPtr (IO CInt))
-- __unique:__ @test_programanalysisselection_mat_Example_get_FunctionWithAssignedHaskellNameByNameMangler@
hs_bindgen_1ccc97a484f823b2 = fmap fromFFIType hs_bindgen_1ccc97a484f823b2_base
{-# NOINLINE functionWithAssignedHaskellNameByNameMangler_funptr #-}
{-| __C declaration:__ @FunctionWithAssignedHaskellNameByNameMangler@

    __defined at:__ @program-analysis\/selection_matches_c_names.h 5:5@

    __exported by:__ @program-analysis\/selection_matches_c_names.h@
-}
functionWithAssignedHaskellNameByNameMangler_funptr :: FunPtr (IO CInt)
{-| __C declaration:__ @FunctionWithAssignedHaskellNameByNameMangler@

    __defined at:__ @program-analysis\/selection_matches_c_names.h 5:5@

    __exported by:__ @program-analysis\/selection_matches_c_names.h@
-}
functionWithAssignedHaskellNameByNameMangler_funptr = unsafePerformIO hs_bindgen_1ccc97a484f823b2