packages feed

hs-bindgen-1.0.0.0: test-artefacts/fixtures/macros/reparse/functions.1.empty/th.txt

-- addDependentFile test-artefacts/headers/golden/macros/reparse/functions.h
-- #include <macros/reparse/functions.h>
-- void hs_bindgen_9b92d478f1b3a709 (
--   signed int arg1
-- )
-- {
--   (foo)(arg1);
-- }
-- signed int hs_bindgen_27c1a1b289182157 (
--   signed int arg1
-- )
-- {
--   return (bar)(arg1);
-- }
-- signed int hs_bindgen_36638004661f2e8f (
--   signed int arg1
-- )
-- {
--   return (baz)(arg1);
-- }
-- void hs_bindgen_630c30830ae4c332 (
--   signed int arg1
-- )
-- {
--   (foo)(arg1);
-- }
-- signed int hs_bindgen_26fa4ddfc00fb318 (
--   signed int arg1
-- )
-- {
--   return (bar)(arg1);
-- }
-- signed int hs_bindgen_c42f62cd14a1cefd (
--   signed int arg1
-- )
-- {
--   return (baz)(arg1);
-- }
-- /* test_macrosreparsefunctions_1_emp_Example_get_foo */
-- __attribute__ ((const))
-- void (*hs_bindgen_44fe83b726d01723 (void)) (
--   signed int arg1
-- )
-- {
--   return &foo;
-- }
-- /* test_macrosreparsefunctions_1_emp_Example_get_bar */
-- __attribute__ ((const))
-- signed int (*hs_bindgen_54a28d63fc0bcff0 (void)) (
--   signed int arg1
-- )
-- {
--   return &bar;
-- }
-- /* test_macrosreparsefunctions_1_emp_Example_get_baz */
-- __attribute__ ((const))
-- signed int (*hs_bindgen_ae839294fa23e037 (void)) (
--   signed int arg1
-- )
-- {
--   return &baz;
-- }
{-| __C declaration:__ @my_int_t@

    __defined at:__ @macros\/reparse\/functions.h 19:16@

    __exported by:__ @macros\/reparse\/functions.h@
-}
newtype My_int_t
    = My_int_t {unwrapMy_int_t :: CInt}
    deriving stock (Eq, Generic, Ord, Read, Show)
    deriving newtype (Bitfield,
                      Bits,
                      Bounded,
                      Enum,
                      FiniteBits,
                      HasFFIType,
                      Integral,
                      Ix,
                      Num,
                      Prim,
                      ReadRaw,
                      Real,
                      StaticSize,
                      Storable,
                      WriteRaw)
instance (~) ty CInt => HasField "unwrapMy_int_t" My_int_t ty
    where hasField = \x_0 -> (\y_1 -> My_int_t{unwrapMy_int_t = y_1},
                              getField @"unwrapMy_int_t" x_0)
instance (~) ty CInt =>
         HasField "unwrapMy_int_t" (Ptr My_int_t) (Ptr ty)
    where getField = fromPtr (Proxy @"unwrapMy_int_t")
instance HasCField My_int_t "unwrapMy_int_t"
    where type CFieldType My_int_t "unwrapMy_int_t" = CInt
          offset# = \_ -> \_ -> 0
-- __unique:__ @test_macrosreparsefunctions_1_emp_Example_Safe_foo@
foreign import ccall safe "hs_bindgen_9b92d478f1b3a709" hs_bindgen_9b92d478f1b3a709_base ::
    CInt
 -> IO ()
-- __unique:__ @test_macrosreparsefunctions_1_emp_Example_Safe_foo@
hs_bindgen_9b92d478f1b3a709 :: CInt -> IO ()
-- __unique:__ @test_macrosreparsefunctions_1_emp_Example_Safe_foo@
hs_bindgen_9b92d478f1b3a709 = \x_0 -> hs_bindgen_9b92d478f1b3a709_base (toFFIType x_0)
{-| __C declaration:__ @foo@

    __defined at:__ @macros\/reparse\/functions.h 7:6@

    __exported by:__ @macros\/reparse\/functions.h@
-}
foo_safe :: CInt -> IO ()
{-| __C declaration:__ @foo@

    __defined at:__ @macros\/reparse\/functions.h 7:6@

    __exported by:__ @macros\/reparse\/functions.h@
-}
foo_safe = hs_bindgen_9b92d478f1b3a709
-- __unique:__ @test_macrosreparsefunctions_1_emp_Example_Safe_bar@
foreign import ccall safe "hs_bindgen_27c1a1b289182157" hs_bindgen_27c1a1b289182157_base ::
    CInt
 -> IO CInt
-- __unique:__ @test_macrosreparsefunctions_1_emp_Example_Safe_bar@
hs_bindgen_27c1a1b289182157 :: CInt -> IO CInt
-- __unique:__ @test_macrosreparsefunctions_1_emp_Example_Safe_bar@
hs_bindgen_27c1a1b289182157 = \x_0 -> fmap fromFFIType (hs_bindgen_27c1a1b289182157_base (toFFIType x_0))
{-| __C declaration:__ @bar@

    __defined at:__ @macros\/reparse\/functions.h 9:19@

    __exported by:__ @macros\/reparse\/functions.h@
-}
bar_safe :: CInt -> IO CInt
{-| __C declaration:__ @bar@

    __defined at:__ @macros\/reparse\/functions.h 9:19@

    __exported by:__ @macros\/reparse\/functions.h@
-}
bar_safe = hs_bindgen_27c1a1b289182157
-- __unique:__ @test_macrosreparsefunctions_1_emp_Example_Safe_baz@
foreign import ccall safe "hs_bindgen_36638004661f2e8f" hs_bindgen_36638004661f2e8f_base ::
    CInt
 -> IO CInt
-- __unique:__ @test_macrosreparsefunctions_1_emp_Example_Safe_baz@
hs_bindgen_36638004661f2e8f :: CInt -> IO CInt
-- __unique:__ @test_macrosreparsefunctions_1_emp_Example_Safe_baz@
hs_bindgen_36638004661f2e8f = \x_0 -> fmap fromFFIType (hs_bindgen_36638004661f2e8f_base (toFFIType x_0))
{-| __C declaration:__ @baz@

    __defined at:__ @macros\/reparse\/functions.h 14:12@

    __exported by:__ @macros\/reparse\/functions.h@
-}
baz_safe :: CInt -> IO CInt
{-| __C declaration:__ @baz@

    __defined at:__ @macros\/reparse\/functions.h 14:12@

    __exported by:__ @macros\/reparse\/functions.h@
-}
baz_safe = hs_bindgen_36638004661f2e8f
-- __unique:__ @test_macrosreparsefunctions_1_emp_Example_Unsafe_foo@
foreign import ccall unsafe "hs_bindgen_630c30830ae4c332" hs_bindgen_630c30830ae4c332_base ::
    CInt
 -> IO ()
-- __unique:__ @test_macrosreparsefunctions_1_emp_Example_Unsafe_foo@
hs_bindgen_630c30830ae4c332 :: CInt -> IO ()
-- __unique:__ @test_macrosreparsefunctions_1_emp_Example_Unsafe_foo@
hs_bindgen_630c30830ae4c332 = \x_0 -> hs_bindgen_630c30830ae4c332_base (toFFIType x_0)
{-| __C declaration:__ @foo@

    __defined at:__ @macros\/reparse\/functions.h 7:6@

    __exported by:__ @macros\/reparse\/functions.h@
-}
foo_unsafe :: CInt -> IO ()
{-| __C declaration:__ @foo@

    __defined at:__ @macros\/reparse\/functions.h 7:6@

    __exported by:__ @macros\/reparse\/functions.h@
-}
foo_unsafe = hs_bindgen_630c30830ae4c332
-- __unique:__ @test_macrosreparsefunctions_1_emp_Example_Unsafe_bar@
foreign import ccall unsafe "hs_bindgen_26fa4ddfc00fb318" hs_bindgen_26fa4ddfc00fb318_base ::
    CInt
 -> IO CInt
-- __unique:__ @test_macrosreparsefunctions_1_emp_Example_Unsafe_bar@
hs_bindgen_26fa4ddfc00fb318 :: CInt -> IO CInt
-- __unique:__ @test_macrosreparsefunctions_1_emp_Example_Unsafe_bar@
hs_bindgen_26fa4ddfc00fb318 = \x_0 -> fmap fromFFIType (hs_bindgen_26fa4ddfc00fb318_base (toFFIType x_0))
{-| __C declaration:__ @bar@

    __defined at:__ @macros\/reparse\/functions.h 9:19@

    __exported by:__ @macros\/reparse\/functions.h@
-}
bar_unsafe :: CInt -> IO CInt
{-| __C declaration:__ @bar@

    __defined at:__ @macros\/reparse\/functions.h 9:19@

    __exported by:__ @macros\/reparse\/functions.h@
-}
bar_unsafe = hs_bindgen_26fa4ddfc00fb318
-- __unique:__ @test_macrosreparsefunctions_1_emp_Example_Unsafe_baz@
foreign import ccall unsafe "hs_bindgen_c42f62cd14a1cefd" hs_bindgen_c42f62cd14a1cefd_base ::
    CInt
 -> IO CInt
-- __unique:__ @test_macrosreparsefunctions_1_emp_Example_Unsafe_baz@
hs_bindgen_c42f62cd14a1cefd :: CInt -> IO CInt
-- __unique:__ @test_macrosreparsefunctions_1_emp_Example_Unsafe_baz@
hs_bindgen_c42f62cd14a1cefd = \x_0 -> fmap fromFFIType (hs_bindgen_c42f62cd14a1cefd_base (toFFIType x_0))
{-| __C declaration:__ @baz@

    __defined at:__ @macros\/reparse\/functions.h 14:12@

    __exported by:__ @macros\/reparse\/functions.h@
-}
baz_unsafe :: CInt -> IO CInt
{-| __C declaration:__ @baz@

    __defined at:__ @macros\/reparse\/functions.h 14:12@

    __exported by:__ @macros\/reparse\/functions.h@
-}
baz_unsafe = hs_bindgen_c42f62cd14a1cefd
-- __unique:__ @test_macrosreparsefunctions_1_emp_Example_get_foo@
foreign import ccall unsafe "hs_bindgen_44fe83b726d01723" hs_bindgen_44fe83b726d01723_base ::
    IO (FunPtr Void)
-- __unique:__ @test_macrosreparsefunctions_1_emp_Example_get_foo@
hs_bindgen_44fe83b726d01723 :: IO (FunPtr (CInt -> IO ()))
-- __unique:__ @test_macrosreparsefunctions_1_emp_Example_get_foo@
hs_bindgen_44fe83b726d01723 = fmap fromFFIType hs_bindgen_44fe83b726d01723_base
{-# NOINLINE foo_funptr #-}
{-| __C declaration:__ @foo@

    __defined at:__ @macros\/reparse\/functions.h 7:6@

    __exported by:__ @macros\/reparse\/functions.h@
-}
foo_funptr :: FunPtr (CInt -> IO ())
{-| __C declaration:__ @foo@

    __defined at:__ @macros\/reparse\/functions.h 7:6@

    __exported by:__ @macros\/reparse\/functions.h@
-}
foo_funptr = unsafePerformIO hs_bindgen_44fe83b726d01723
-- __unique:__ @test_macrosreparsefunctions_1_emp_Example_get_bar@
foreign import ccall unsafe "hs_bindgen_54a28d63fc0bcff0" hs_bindgen_54a28d63fc0bcff0_base ::
    IO (FunPtr Void)
-- __unique:__ @test_macrosreparsefunctions_1_emp_Example_get_bar@
hs_bindgen_54a28d63fc0bcff0 :: IO (FunPtr (CInt -> IO CInt))
-- __unique:__ @test_macrosreparsefunctions_1_emp_Example_get_bar@
hs_bindgen_54a28d63fc0bcff0 = fmap fromFFIType hs_bindgen_54a28d63fc0bcff0_base
{-# NOINLINE bar_funptr #-}
{-| __C declaration:__ @bar@

    __defined at:__ @macros\/reparse\/functions.h 9:19@

    __exported by:__ @macros\/reparse\/functions.h@
-}
bar_funptr :: FunPtr (CInt -> IO CInt)
{-| __C declaration:__ @bar@

    __defined at:__ @macros\/reparse\/functions.h 9:19@

    __exported by:__ @macros\/reparse\/functions.h@
-}
bar_funptr = unsafePerformIO hs_bindgen_54a28d63fc0bcff0
-- __unique:__ @test_macrosreparsefunctions_1_emp_Example_get_baz@
foreign import ccall unsafe "hs_bindgen_ae839294fa23e037" hs_bindgen_ae839294fa23e037_base ::
    IO (FunPtr Void)
-- __unique:__ @test_macrosreparsefunctions_1_emp_Example_get_baz@
hs_bindgen_ae839294fa23e037 :: IO (FunPtr (CInt -> IO CInt))
-- __unique:__ @test_macrosreparsefunctions_1_emp_Example_get_baz@
hs_bindgen_ae839294fa23e037 = fmap fromFFIType hs_bindgen_ae839294fa23e037_base
{-# NOINLINE baz_funptr #-}
{-| __C declaration:__ @baz@

    __defined at:__ @macros\/reparse\/functions.h 14:12@

    __exported by:__ @macros\/reparse\/functions.h@
-}
baz_funptr :: FunPtr (CInt -> IO CInt)
{-| __C declaration:__ @baz@

    __defined at:__ @macros\/reparse\/functions.h 14:12@

    __exported by:__ @macros\/reparse\/functions.h@
-}
baz_funptr = unsafePerformIO hs_bindgen_ae839294fa23e037