packages feed

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

-- addDependentFile test-artefacts/headers/golden/macros/reparse/functions.h
-- #include <macros/reparse/functions.h>
-- void hs_bindgen_b6e9ae739486d53b (
--   signed int arg1
-- )
-- {
--   (foo)(arg1);
-- }
-- signed int hs_bindgen_e44e9d05eacbc37e (
--   signed int arg1
-- )
-- {
--   return (bar)(arg1);
-- }
-- signed int hs_bindgen_4566eba0a19c4890 (
--   signed int arg1
-- )
-- {
--   return (baz)(arg1);
-- }
-- void hs_bindgen_39eae3eb6460ea6a (
--   signed int arg1
-- )
-- {
--   (foo)(arg1);
-- }
-- signed int hs_bindgen_eb2d164aacb2e06d (
--   signed int arg1
-- )
-- {
--   return (bar)(arg1);
-- }
-- signed int hs_bindgen_69a979a1e6a18eb1 (
--   signed int arg1
-- )
-- {
--   return (baz)(arg1);
-- }
-- /* test_macrosreparsefunctions_Example_get_foo */
-- __attribute__ ((const))
-- void (*hs_bindgen_0ee6ccf5e9065e6c (void)) (
--   signed int arg1
-- )
-- {
--   return &foo;
-- }
-- /* test_macrosreparsefunctions_Example_get_bar */
-- __attribute__ ((const))
-- signed int (*hs_bindgen_8ec5846013c7fa41 (void)) (
--   signed int arg1
-- )
-- {
--   return &bar;
-- }
-- /* test_macrosreparsefunctions_Example_get_baz */
-- __attribute__ ((const))
-- signed int (*hs_bindgen_740f410e15c8820e (void)) (
--   signed int arg1
-- )
-- {
--   return &baz;
-- }
{-| __C declaration:__ @macro ID@

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

    __exported by:__ @macros\/reparse\/functions.h@
-}
iD :: forall a_0 . a_0 -> a_0
{-| __C declaration:__ @macro ID@

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

    __exported by:__ @macros\/reparse\/functions.h@
-}
iD = \x_0 -> x_0
{-| __C declaration:__ @macro MY_INT@

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

    __exported by:__ @macros\/reparse\/functions.h@
-}
newtype MY_INT
    = MY_INT {unwrapMY_INT :: 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" MY_INT ty
    where hasField = \x_0 -> (\y_1 -> MY_INT{unwrapMY_INT = y_1},
                              getField @"unwrapMY_INT" x_0)
instance (~) ty CInt =>
         HasField "unwrapMY_INT" (Ptr MY_INT) (Ptr ty)
    where getField = fromPtr (Proxy @"unwrapMY_INT")
instance HasCField MY_INT "unwrapMY_INT"
    where type CFieldType MY_INT "unwrapMY_INT" = CInt
          offset# = \_ -> \_ -> 0
{-| __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 :: MY_INT}
    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 MY_INT => 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 MY_INT =>
         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" = MY_INT
          offset# = \_ -> \_ -> 0
-- __unique:__ @test_macrosreparsefunctions_Example_Safe_foo@
foreign import ccall safe "hs_bindgen_b6e9ae739486d53b" hs_bindgen_b6e9ae739486d53b_base ::
    CInt
 -> IO ()
-- __unique:__ @test_macrosreparsefunctions_Example_Safe_foo@
hs_bindgen_b6e9ae739486d53b :: CInt -> IO ()
-- __unique:__ @test_macrosreparsefunctions_Example_Safe_foo@
hs_bindgen_b6e9ae739486d53b = \x_0 -> hs_bindgen_b6e9ae739486d53b_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_b6e9ae739486d53b
-- __unique:__ @test_macrosreparsefunctions_Example_Safe_bar@
foreign import ccall safe "hs_bindgen_e44e9d05eacbc37e" hs_bindgen_e44e9d05eacbc37e_base ::
    CInt
 -> IO CInt
-- __unique:__ @test_macrosreparsefunctions_Example_Safe_bar@
hs_bindgen_e44e9d05eacbc37e :: CInt -> IO CInt
-- __unique:__ @test_macrosreparsefunctions_Example_Safe_bar@
hs_bindgen_e44e9d05eacbc37e = \x_0 -> fmap fromFFIType (hs_bindgen_e44e9d05eacbc37e_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_e44e9d05eacbc37e
-- __unique:__ @test_macrosreparsefunctions_Example_Safe_baz@
foreign import ccall safe "hs_bindgen_4566eba0a19c4890" hs_bindgen_4566eba0a19c4890_base ::
    CInt
 -> IO CInt
-- __unique:__ @test_macrosreparsefunctions_Example_Safe_baz@
hs_bindgen_4566eba0a19c4890 :: CInt -> IO CInt
-- __unique:__ @test_macrosreparsefunctions_Example_Safe_baz@
hs_bindgen_4566eba0a19c4890 = \x_0 -> fmap fromFFIType (hs_bindgen_4566eba0a19c4890_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_4566eba0a19c4890
-- __unique:__ @test_macrosreparsefunctions_Example_Unsafe_foo@
foreign import ccall unsafe "hs_bindgen_39eae3eb6460ea6a" hs_bindgen_39eae3eb6460ea6a_base ::
    CInt
 -> IO ()
-- __unique:__ @test_macrosreparsefunctions_Example_Unsafe_foo@
hs_bindgen_39eae3eb6460ea6a :: CInt -> IO ()
-- __unique:__ @test_macrosreparsefunctions_Example_Unsafe_foo@
hs_bindgen_39eae3eb6460ea6a = \x_0 -> hs_bindgen_39eae3eb6460ea6a_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_39eae3eb6460ea6a
-- __unique:__ @test_macrosreparsefunctions_Example_Unsafe_bar@
foreign import ccall unsafe "hs_bindgen_eb2d164aacb2e06d" hs_bindgen_eb2d164aacb2e06d_base ::
    CInt
 -> IO CInt
-- __unique:__ @test_macrosreparsefunctions_Example_Unsafe_bar@
hs_bindgen_eb2d164aacb2e06d :: CInt -> IO CInt
-- __unique:__ @test_macrosreparsefunctions_Example_Unsafe_bar@
hs_bindgen_eb2d164aacb2e06d = \x_0 -> fmap fromFFIType (hs_bindgen_eb2d164aacb2e06d_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_eb2d164aacb2e06d
-- __unique:__ @test_macrosreparsefunctions_Example_Unsafe_baz@
foreign import ccall unsafe "hs_bindgen_69a979a1e6a18eb1" hs_bindgen_69a979a1e6a18eb1_base ::
    CInt
 -> IO CInt
-- __unique:__ @test_macrosreparsefunctions_Example_Unsafe_baz@
hs_bindgen_69a979a1e6a18eb1 :: CInt -> IO CInt
-- __unique:__ @test_macrosreparsefunctions_Example_Unsafe_baz@
hs_bindgen_69a979a1e6a18eb1 = \x_0 -> fmap fromFFIType (hs_bindgen_69a979a1e6a18eb1_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_69a979a1e6a18eb1
-- __unique:__ @test_macrosreparsefunctions_Example_get_foo@
foreign import ccall unsafe "hs_bindgen_0ee6ccf5e9065e6c" hs_bindgen_0ee6ccf5e9065e6c_base ::
    IO (FunPtr Void)
-- __unique:__ @test_macrosreparsefunctions_Example_get_foo@
hs_bindgen_0ee6ccf5e9065e6c :: IO (FunPtr (CInt -> IO ()))
-- __unique:__ @test_macrosreparsefunctions_Example_get_foo@
hs_bindgen_0ee6ccf5e9065e6c = fmap fromFFIType hs_bindgen_0ee6ccf5e9065e6c_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_0ee6ccf5e9065e6c
-- __unique:__ @test_macrosreparsefunctions_Example_get_bar@
foreign import ccall unsafe "hs_bindgen_8ec5846013c7fa41" hs_bindgen_8ec5846013c7fa41_base ::
    IO (FunPtr Void)
-- __unique:__ @test_macrosreparsefunctions_Example_get_bar@
hs_bindgen_8ec5846013c7fa41 :: IO (FunPtr (CInt -> IO CInt))
-- __unique:__ @test_macrosreparsefunctions_Example_get_bar@
hs_bindgen_8ec5846013c7fa41 = fmap fromFFIType hs_bindgen_8ec5846013c7fa41_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_8ec5846013c7fa41
-- __unique:__ @test_macrosreparsefunctions_Example_get_baz@
foreign import ccall unsafe "hs_bindgen_740f410e15c8820e" hs_bindgen_740f410e15c8820e_base ::
    IO (FunPtr Void)
-- __unique:__ @test_macrosreparsefunctions_Example_get_baz@
hs_bindgen_740f410e15c8820e :: IO (FunPtr (CInt -> IO CInt))
-- __unique:__ @test_macrosreparsefunctions_Example_get_baz@
hs_bindgen_740f410e15c8820e = fmap fromFFIType hs_bindgen_740f410e15c8820e_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_740f410e15c8820e