-- addDependentFile examples/golden/manual/function_pointers.h -- #include -- signed int hs_bindgen_8c6beff641297a13 ( -- signed int arg1 -- ) -- { -- return square(arg1); -- } -- signed int hs_bindgen_3dfb239ac098f471 ( -- signed int arg1, -- signed int arg2 -- ) -- { -- return plus(arg1, arg2); -- } -- signed int hs_bindgen_983beb37938c4d96 ( -- signed int (*arg1) ( -- signed int arg1 -- ), -- signed int arg2 -- ) -- { -- return apply1(arg1, arg2); -- } -- signed int hs_bindgen_8a62074f5475563b ( -- signed int (*arg1) ( -- signed int arg1, -- signed int arg2 -- ), -- signed int arg2, -- signed int arg3 -- ) -- { -- return apply2(arg1, arg2, arg3); -- } -- signed int hs_bindgen_229d4041a92cd6b6 ( -- int2int *arg1, -- signed int arg2 -- ) -- { -- return apply1_pointer_arg(arg1, arg2); -- } -- signed int hs_bindgen_de9f1109e03648e4 ( -- int2int *arg1, -- signed int arg2 -- ) -- { -- return apply1_nopointer_arg(arg1, arg2); -- } -- signed int (*const hs_bindgen_8bea6b2106c55d5b (void)) ( -- int2int *arg1, -- signed int arg2 -- ) -- { -- return apply1_nopointer_res(); -- } -- signed int hs_bindgen_db669c022bc12e81 ( -- signed int arg1 -- ) -- { -- return square(arg1); -- } -- signed int hs_bindgen_0bb46b9dde136391 ( -- signed int arg1, -- signed int arg2 -- ) -- { -- return plus(arg1, arg2); -- } -- signed int hs_bindgen_3ff551d60859d359 ( -- signed int (*arg1) ( -- signed int arg1 -- ), -- signed int arg2 -- ) -- { -- return apply1(arg1, arg2); -- } -- signed int hs_bindgen_4c92d113161d27cf ( -- signed int (*arg1) ( -- signed int arg1, -- signed int arg2 -- ), -- signed int arg2, -- signed int arg3 -- ) -- { -- return apply2(arg1, arg2, arg3); -- } -- signed int hs_bindgen_2f904bf3ce7a5f06 ( -- int2int *arg1, -- signed int arg2 -- ) -- { -- return apply1_pointer_arg(arg1, arg2); -- } -- signed int hs_bindgen_966092b638965558 ( -- int2int *arg1, -- signed int arg2 -- ) -- { -- return apply1_nopointer_arg(arg1, arg2); -- } -- signed int (*const hs_bindgen_99a8340e6e6029c5 (void)) ( -- int2int *arg1, -- signed int arg2 -- ) -- { -- return apply1_nopointer_res(); -- } -- /* test_manualfunction_pointers_Example_get_square */ -- __attribute__ ((const)) -- signed int (*hs_bindgen_f0adbe322df05825 (void)) ( -- signed int arg1 -- ) -- { -- return □ -- } -- /* test_manualfunction_pointers_Example_get_plus */ -- __attribute__ ((const)) -- signed int (*hs_bindgen_ab2a2131b5f9f197 (void)) ( -- signed int arg1, -- signed int arg2 -- ) -- { -- return + -- } -- /* test_manualfunction_pointers_Example_get_apply1 */ -- __attribute__ ((const)) -- signed int (*hs_bindgen_b3bb0146641acd39 (void)) ( -- signed int (*arg1) ( -- signed int arg1 -- ), -- signed int arg2 -- ) -- { -- return &apply1; -- } -- /* test_manualfunction_pointers_Example_get_apply2 */ -- __attribute__ ((const)) -- signed int (*hs_bindgen_78245c4946e6da00 (void)) ( -- signed int (*arg1) ( -- signed int arg1, -- signed int arg2 -- ), -- signed int arg2, -- signed int arg3 -- ) -- { -- return &apply2; -- } -- /* test_manualfunction_pointers_Example_get_apply1_pointer_arg */ -- __attribute__ ((const)) -- signed int (*hs_bindgen_00276448b1e8af8a (void)) ( -- int2int *arg1, -- signed int arg2 -- ) -- { -- return &apply1_pointer_arg; -- } -- /* test_manualfunction_pointers_Example_get_apply1_nopointer_arg */ -- __attribute__ ((const)) -- signed int (*hs_bindgen_00f9010b80cdee19 (void)) ( -- int2int *arg1, -- signed int arg2 -- ) -- { -- return &apply1_nopointer_arg; -- } -- /* test_manualfunction_pointers_Example_get_apply1_nopointer_res */ -- __attribute__ ((const)) -- signed int (*const (*hs_bindgen_16929b4528263721 (void)) (void)) ( -- int2int *arg1, -- signed int arg2 -- ) -- { -- return &apply1_nopointer_res; -- } -- /* test_manualfunction_pointers_Example_get_apply1_nopointer_var */ -- __attribute__ ((const)) -- signed int (*const *hs_bindgen_8ca6ae5d7bf88149 (void)) ( -- int2int *arg1, -- signed int arg2 -- ) -- { -- return &apply1_nopointer_var; -- } -- /* test_manualfunction_pointers_Example_get_apply1_struct */ -- __attribute__ ((const)) -- struct Apply1Struct const *hs_bindgen_33a4962ebf2e9daf (void) -- { -- return &apply1_struct; -- } -- /* test_manualfunction_pointers_Example_get_apply1_union */ -- __attribute__ ((const)) -- union Apply1Union const *hs_bindgen_d1ddd3b607c95874 (void) -- { -- return &apply1_union; -- } {-| __C declaration:__ @int2int@ __defined at:__ @manual\/function_pointers.h 19:13@ __exported by:__ @manual\/function_pointers.h@ -} newtype Int2int = Int2int {unwrapInt2int :: (CInt -> IO CInt)} {- ^ __C declaration:__ @int2int@ __defined at:__ @manual\/function_pointers.h 19:13@ __exported by:__ @manual\/function_pointers.h@ -} deriving newtype HasFFIType foreign import ccall safe "wrapper" hs_bindgen_a6c7dd49f5b9d470_base :: Int32 -> IO Int32 -> IO (FunPtr (Int32 -> IO Int32)) -- __unique:__ @toInt2int@ hs_bindgen_a6c7dd49f5b9d470 :: Int2int -> IO (FunPtr Int2int) -- __unique:__ @toInt2int@ hs_bindgen_a6c7dd49f5b9d470 = \fun_0 -> fmap castFunPtrFromFFIType (hs_bindgen_a6c7dd49f5b9d470_base (toFFIType fun_0)) foreign import ccall safe "dynamic" hs_bindgen_65378a8a3cf640ad_base :: FunPtr (Int32 -> IO Int32) -> Int32 -> IO Int32 -- __unique:__ @fromInt2int@ hs_bindgen_65378a8a3cf640ad :: FunPtr Int2int -> Int2int -- __unique:__ @fromInt2int@ hs_bindgen_65378a8a3cf640ad = \funPtr_0 -> fromFFIType (hs_bindgen_65378a8a3cf640ad_base (castFunPtrToFFIType funPtr_0)) instance ToFunPtr Int2int where toFunPtr = hs_bindgen_a6c7dd49f5b9d470 instance FromFunPtr Int2int where fromFunPtr = hs_bindgen_65378a8a3cf640ad instance TyEq ty (CFieldType Int2int "unwrapInt2int") => HasField "unwrapInt2int" (Ptr Int2int) (Ptr ty) where getField = fromPtr (Proxy @"unwrapInt2int") instance HasCField Int2int "unwrapInt2int" where type CFieldType Int2int "unwrapInt2int" = CInt -> IO CInt offset# = \_ -> \_ -> 0 {-| A struct field pointing to a function like apply1_nopointer(). __C declaration:__ @struct Apply1Struct@ __defined at:__ @manual\/function_pointers.h 37:8@ __exported by:__ @manual\/function_pointers.h@ -} data Apply1Struct = Apply1Struct {apply1Struct_apply1_nopointer_struct_field :: (FunPtr (FunPtr Int2int -> CInt -> IO CInt)) {- ^ __C declaration:__ @apply1_nopointer_struct_field@ __defined at:__ @manual\/function_pointers.h 38:16@ __exported by:__ @manual\/function_pointers.h@ -}} {- ^ A struct field pointing to a function like apply1_nopointer(). __C declaration:__ @struct Apply1Struct@ __defined at:__ @manual\/function_pointers.h 37:8@ __exported by:__ @manual\/function_pointers.h@ -} deriving stock (Eq, Show) instance StaticSize Apply1Struct where staticSizeOf = \_ -> 8 :: Int staticAlignment = \_ -> 8 :: Int instance ReadRaw Apply1Struct where readRaw = \ptr_0 -> pure Apply1Struct <*> readRaw (Proxy @"apply1Struct_apply1_nopointer_struct_field") ptr_0 instance WriteRaw Apply1Struct where writeRaw = \ptr_0 -> \s_1 -> case s_1 of Apply1Struct apply1Struct_apply1_nopointer_struct_field_2 -> writeRaw (Proxy @"apply1Struct_apply1_nopointer_struct_field") ptr_0 apply1Struct_apply1_nopointer_struct_field_2 deriving via (EquivStorable Apply1Struct) instance Storable Apply1Struct instance HasCField Apply1Struct "apply1Struct_apply1_nopointer_struct_field" where type CFieldType Apply1Struct "apply1Struct_apply1_nopointer_struct_field" = FunPtr (FunPtr Int2int -> CInt -> IO CInt) offset# = \_ -> \_ -> 0 instance TyEq ty (CFieldType Apply1Struct "apply1Struct_apply1_nopointer_struct_field") => HasField "apply1Struct_apply1_nopointer_struct_field" (Ptr Apply1Struct) (Ptr ty) where getField = fromPtr (Proxy @"apply1Struct_apply1_nopointer_struct_field") {-| A union field pointing to a function like apply1_nopointer(). __C declaration:__ @union Apply1Union@ __defined at:__ @manual\/function_pointers.h 43:7@ __exported by:__ @manual\/function_pointers.h@ -} newtype Apply1Union = Apply1Union {unwrapApply1Union :: ByteArray} {- ^ A union field pointing to a function like apply1_nopointer(). __C declaration:__ @union Apply1Union@ __defined at:__ @manual\/function_pointers.h 43:7@ __exported by:__ @manual\/function_pointers.h@ -} deriving via (SizedByteArray 8 8) instance StaticSize Apply1Union deriving via (SizedByteArray 8 8) instance ReadRaw Apply1Union deriving via (SizedByteArray 8 8) instance WriteRaw Apply1Union deriving via (EquivStorable Apply1Union) instance Storable Apply1Union {-| __See:__ 'set_apply1Union_apply1_nopointer_union_field' __C declaration:__ @apply1_nopointer_union_field@ __defined at:__ @manual\/function_pointers.h 44:16@ __exported by:__ @manual\/function_pointers.h@ -} get_apply1Union_apply1_nopointer_union_field :: Apply1Union -> FunPtr (FunPtr Int2int -> CInt -> IO CInt) {-| __See:__ 'set_apply1Union_apply1_nopointer_union_field' __C declaration:__ @apply1_nopointer_union_field@ __defined at:__ @manual\/function_pointers.h 44:16@ __exported by:__ @manual\/function_pointers.h@ -} get_apply1Union_apply1_nopointer_union_field = getUnionPayload {-| __See:__ 'get_apply1Union_apply1_nopointer_union_field' -} set_apply1Union_apply1_nopointer_union_field :: FunPtr (FunPtr Int2int -> CInt -> IO CInt) -> Apply1Union {-| __See:__ 'get_apply1Union_apply1_nopointer_union_field' -} set_apply1Union_apply1_nopointer_union_field = setUnionPayload instance HasCField Apply1Union "apply1Union_apply1_nopointer_union_field" where type CFieldType Apply1Union "apply1Union_apply1_nopointer_union_field" = FunPtr (FunPtr Int2int -> CInt -> IO CInt) offset# = \_ -> \_ -> 0 instance TyEq ty (CFieldType Apply1Union "apply1Union_apply1_nopointer_union_field") => HasField "apply1Union_apply1_nopointer_union_field" (Ptr Apply1Union) (Ptr ty) where getField = fromPtr (Proxy @"apply1Union_apply1_nopointer_union_field") foreign import ccall safe "wrapper" hs_bindgen_fe02c1e534fc52ea_base :: FunPtr Void -> Int32 -> IO Int32 -> IO (FunPtr (FunPtr Void -> Int32 -> IO Int32)) -- __unique:__ @instance ToFunPtr ((Ptr.FunPtr Int2int) -> FC.CInt -> IO FC.CInt)@ hs_bindgen_fe02c1e534fc52ea :: (FunPtr Int2int -> CInt -> IO CInt) -> IO (FunPtr (FunPtr Int2int -> CInt -> IO CInt)) -- __unique:__ @instance ToFunPtr ((Ptr.FunPtr Int2int) -> FC.CInt -> IO FC.CInt)@ hs_bindgen_fe02c1e534fc52ea = \fun_0 -> fmap castFunPtrFromFFIType (hs_bindgen_fe02c1e534fc52ea_base (toFFIType fun_0)) foreign import ccall safe "dynamic" hs_bindgen_fc27363846cb6139_base :: FunPtr (FunPtr Void -> Int32 -> IO Int32) -> FunPtr Void -> Int32 -> IO Int32 -- __unique:__ @instance FromFunPtr ((Ptr.FunPtr Int2int) -> FC.CInt -> IO FC.CInt)@ hs_bindgen_fc27363846cb6139 :: FunPtr (FunPtr Int2int -> CInt -> IO CInt) -> FunPtr Int2int -> CInt -> IO CInt -- __unique:__ @instance FromFunPtr ((Ptr.FunPtr Int2int) -> FC.CInt -> IO FC.CInt)@ hs_bindgen_fc27363846cb6139 = \funPtr_0 -> fromFFIType (hs_bindgen_fc27363846cb6139_base (castFunPtrToFFIType funPtr_0)) instance ToFunPtr (FunPtr Int2int -> CInt -> IO CInt) where toFunPtr = hs_bindgen_fe02c1e534fc52ea instance FromFunPtr (FunPtr Int2int -> CInt -> IO CInt) where fromFunPtr = hs_bindgen_fc27363846cb6139 -- __unique:__ @test_manualfunction_pointers_Example_Safe_square@ foreign import ccall safe "hs_bindgen_8c6beff641297a13" hs_bindgen_8c6beff641297a13_base :: Int32 -> IO Int32 -- __unique:__ @test_manualfunction_pointers_Example_Safe_square@ hs_bindgen_8c6beff641297a13 :: CInt -> IO CInt -- __unique:__ @test_manualfunction_pointers_Example_Safe_square@ hs_bindgen_8c6beff641297a13 = fromFFIType hs_bindgen_8c6beff641297a13_base {-| __C declaration:__ @square@ __defined at:__ @manual\/function_pointers.h 5:12@ __exported by:__ @manual\/function_pointers.h@ -} square :: CInt -> IO CInt {-| __C declaration:__ @square@ __defined at:__ @manual\/function_pointers.h 5:12@ __exported by:__ @manual\/function_pointers.h@ -} square = hs_bindgen_8c6beff641297a13 -- __unique:__ @test_manualfunction_pointers_Example_Safe_plus@ foreign import ccall safe "hs_bindgen_3dfb239ac098f471" hs_bindgen_3dfb239ac098f471_base :: Int32 -> Int32 -> IO Int32 -- __unique:__ @test_manualfunction_pointers_Example_Safe_plus@ hs_bindgen_3dfb239ac098f471 :: CInt -> CInt -> IO CInt -- __unique:__ @test_manualfunction_pointers_Example_Safe_plus@ hs_bindgen_3dfb239ac098f471 = fromFFIType hs_bindgen_3dfb239ac098f471_base {-| __C declaration:__ @plus@ __defined at:__ @manual\/function_pointers.h 7:12@ __exported by:__ @manual\/function_pointers.h@ -} plus :: CInt -> CInt -> IO CInt {-| __C declaration:__ @plus@ __defined at:__ @manual\/function_pointers.h 7:12@ __exported by:__ @manual\/function_pointers.h@ -} plus = hs_bindgen_3dfb239ac098f471 -- __unique:__ @test_manualfunction_pointers_Example_Safe_apply1@ foreign import ccall safe "hs_bindgen_983beb37938c4d96" hs_bindgen_983beb37938c4d96_base :: FunPtr Void -> Int32 -> IO Int32 -- __unique:__ @test_manualfunction_pointers_Example_Safe_apply1@ hs_bindgen_983beb37938c4d96 :: FunPtr (CInt -> IO CInt) -> CInt -> IO CInt -- __unique:__ @test_manualfunction_pointers_Example_Safe_apply1@ hs_bindgen_983beb37938c4d96 = fromFFIType hs_bindgen_983beb37938c4d96_base {-| __C declaration:__ @apply1@ __defined at:__ @manual\/function_pointers.h 9:12@ __exported by:__ @manual\/function_pointers.h@ -} apply1 :: FunPtr (CInt -> IO CInt) -> CInt -> IO CInt {-| __C declaration:__ @apply1@ __defined at:__ @manual\/function_pointers.h 9:12@ __exported by:__ @manual\/function_pointers.h@ -} apply1 = hs_bindgen_983beb37938c4d96 -- __unique:__ @test_manualfunction_pointers_Example_Safe_apply2@ foreign import ccall safe "hs_bindgen_8a62074f5475563b" hs_bindgen_8a62074f5475563b_base :: FunPtr Void -> Int32 -> Int32 -> IO Int32 -- __unique:__ @test_manualfunction_pointers_Example_Safe_apply2@ hs_bindgen_8a62074f5475563b :: FunPtr (CInt -> CInt -> IO CInt) -> CInt -> CInt -> IO CInt -- __unique:__ @test_manualfunction_pointers_Example_Safe_apply2@ hs_bindgen_8a62074f5475563b = fromFFIType hs_bindgen_8a62074f5475563b_base {-| __C declaration:__ @apply2@ __defined at:__ @manual\/function_pointers.h 11:12@ __exported by:__ @manual\/function_pointers.h@ -} apply2 :: FunPtr (CInt -> CInt -> IO CInt) -> CInt -> CInt -> IO CInt {-| __C declaration:__ @apply2@ __defined at:__ @manual\/function_pointers.h 11:12@ __exported by:__ @manual\/function_pointers.h@ -} apply2 = hs_bindgen_8a62074f5475563b -- __unique:__ @test_manualfunction_pointers_Example_Safe_apply1_pointer_arg@ foreign import ccall safe "hs_bindgen_229d4041a92cd6b6" hs_bindgen_229d4041a92cd6b6_base :: FunPtr Void -> Int32 -> IO Int32 -- __unique:__ @test_manualfunction_pointers_Example_Safe_apply1_pointer_arg@ hs_bindgen_229d4041a92cd6b6 :: FunPtr Int2int -> CInt -> IO CInt -- __unique:__ @test_manualfunction_pointers_Example_Safe_apply1_pointer_arg@ hs_bindgen_229d4041a92cd6b6 = fromFFIType hs_bindgen_229d4041a92cd6b6_base {-| Basically the same as apply1(), but here for illustratory purposes. __C declaration:__ @apply1_pointer_arg@ __defined at:__ @manual\/function_pointers.h 22:12@ __exported by:__ @manual\/function_pointers.h@ -} apply1_pointer_arg :: FunPtr Int2int -> CInt -> IO CInt {-| Basically the same as apply1(), but here for illustratory purposes. __C declaration:__ @apply1_pointer_arg@ __defined at:__ @manual\/function_pointers.h 22:12@ __exported by:__ @manual\/function_pointers.h@ -} apply1_pointer_arg = hs_bindgen_229d4041a92cd6b6 -- __unique:__ @test_manualfunction_pointers_Example_Safe_apply1_nopointer_arg@ foreign import ccall safe "hs_bindgen_de9f1109e03648e4" hs_bindgen_de9f1109e03648e4_base :: FunPtr Void -> Int32 -> IO Int32 -- __unique:__ @test_manualfunction_pointers_Example_Safe_apply1_nopointer_arg@ hs_bindgen_de9f1109e03648e4 :: FunPtr Int2int -> CInt -> IO CInt -- __unique:__ @test_manualfunction_pointers_Example_Safe_apply1_nopointer_arg@ hs_bindgen_de9f1109e03648e4 = fromFFIType hs_bindgen_de9f1109e03648e4_base {-| A version of apply1_pointer_arg() that declares to take a argument of function type, rather than a pointer-to-function type. __C declaration:__ @apply1_nopointer_arg@ __defined at:__ @manual\/function_pointers.h 26:12@ __exported by:__ @manual\/function_pointers.h@ -} apply1_nopointer_arg :: FunPtr Int2int -> CInt -> IO CInt {-| A version of apply1_pointer_arg() that declares to take a argument of function type, rather than a pointer-to-function type. __C declaration:__ @apply1_nopointer_arg@ __defined at:__ @manual\/function_pointers.h 26:12@ __exported by:__ @manual\/function_pointers.h@ -} apply1_nopointer_arg = hs_bindgen_de9f1109e03648e4 -- __unique:__ @test_manualfunction_pointers_Example_Safe_apply1_nopointer_res@ foreign import ccall safe "hs_bindgen_8bea6b2106c55d5b" hs_bindgen_8bea6b2106c55d5b_base :: IO (FunPtr Void) -- __unique:__ @test_manualfunction_pointers_Example_Safe_apply1_nopointer_res@ hs_bindgen_8bea6b2106c55d5b :: IO (FunPtr (FunPtr Int2int -> CInt -> IO CInt)) -- __unique:__ @test_manualfunction_pointers_Example_Safe_apply1_nopointer_res@ hs_bindgen_8bea6b2106c55d5b = fromFFIType hs_bindgen_8bea6b2106c55d5b_base {-| A function returning a pointer to a function like apply1_nopointer(). __C declaration:__ @apply1_nopointer_res@ __defined at:__ @manual\/function_pointers.h 31:21@ __exported by:__ @manual\/function_pointers.h@ -} apply1_nopointer_res :: IO (FunPtr (FunPtr Int2int -> CInt -> IO CInt)) {-| A function returning a pointer to a function like apply1_nopointer(). __C declaration:__ @apply1_nopointer_res@ __defined at:__ @manual\/function_pointers.h 31:21@ __exported by:__ @manual\/function_pointers.h@ -} apply1_nopointer_res = hs_bindgen_8bea6b2106c55d5b -- __unique:__ @test_manualfunction_pointers_Example_Unsafe_square@ foreign import ccall unsafe "hs_bindgen_db669c022bc12e81" hs_bindgen_db669c022bc12e81_base :: Int32 -> IO Int32 -- __unique:__ @test_manualfunction_pointers_Example_Unsafe_square@ hs_bindgen_db669c022bc12e81 :: CInt -> IO CInt -- __unique:__ @test_manualfunction_pointers_Example_Unsafe_square@ hs_bindgen_db669c022bc12e81 = fromFFIType hs_bindgen_db669c022bc12e81_base {-| __C declaration:__ @square@ __defined at:__ @manual\/function_pointers.h 5:12@ __exported by:__ @manual\/function_pointers.h@ -} square :: CInt -> IO CInt {-| __C declaration:__ @square@ __defined at:__ @manual\/function_pointers.h 5:12@ __exported by:__ @manual\/function_pointers.h@ -} square = hs_bindgen_db669c022bc12e81 -- __unique:__ @test_manualfunction_pointers_Example_Unsafe_plus@ foreign import ccall unsafe "hs_bindgen_0bb46b9dde136391" hs_bindgen_0bb46b9dde136391_base :: Int32 -> Int32 -> IO Int32 -- __unique:__ @test_manualfunction_pointers_Example_Unsafe_plus@ hs_bindgen_0bb46b9dde136391 :: CInt -> CInt -> IO CInt -- __unique:__ @test_manualfunction_pointers_Example_Unsafe_plus@ hs_bindgen_0bb46b9dde136391 = fromFFIType hs_bindgen_0bb46b9dde136391_base {-| __C declaration:__ @plus@ __defined at:__ @manual\/function_pointers.h 7:12@ __exported by:__ @manual\/function_pointers.h@ -} plus :: CInt -> CInt -> IO CInt {-| __C declaration:__ @plus@ __defined at:__ @manual\/function_pointers.h 7:12@ __exported by:__ @manual\/function_pointers.h@ -} plus = hs_bindgen_0bb46b9dde136391 -- __unique:__ @test_manualfunction_pointers_Example_Unsafe_apply1@ foreign import ccall unsafe "hs_bindgen_3ff551d60859d359" hs_bindgen_3ff551d60859d359_base :: FunPtr Void -> Int32 -> IO Int32 -- __unique:__ @test_manualfunction_pointers_Example_Unsafe_apply1@ hs_bindgen_3ff551d60859d359 :: FunPtr (CInt -> IO CInt) -> CInt -> IO CInt -- __unique:__ @test_manualfunction_pointers_Example_Unsafe_apply1@ hs_bindgen_3ff551d60859d359 = fromFFIType hs_bindgen_3ff551d60859d359_base {-| __C declaration:__ @apply1@ __defined at:__ @manual\/function_pointers.h 9:12@ __exported by:__ @manual\/function_pointers.h@ -} apply1 :: FunPtr (CInt -> IO CInt) -> CInt -> IO CInt {-| __C declaration:__ @apply1@ __defined at:__ @manual\/function_pointers.h 9:12@ __exported by:__ @manual\/function_pointers.h@ -} apply1 = hs_bindgen_3ff551d60859d359 -- __unique:__ @test_manualfunction_pointers_Example_Unsafe_apply2@ foreign import ccall unsafe "hs_bindgen_4c92d113161d27cf" hs_bindgen_4c92d113161d27cf_base :: FunPtr Void -> Int32 -> Int32 -> IO Int32 -- __unique:__ @test_manualfunction_pointers_Example_Unsafe_apply2@ hs_bindgen_4c92d113161d27cf :: FunPtr (CInt -> CInt -> IO CInt) -> CInt -> CInt -> IO CInt -- __unique:__ @test_manualfunction_pointers_Example_Unsafe_apply2@ hs_bindgen_4c92d113161d27cf = fromFFIType hs_bindgen_4c92d113161d27cf_base {-| __C declaration:__ @apply2@ __defined at:__ @manual\/function_pointers.h 11:12@ __exported by:__ @manual\/function_pointers.h@ -} apply2 :: FunPtr (CInt -> CInt -> IO CInt) -> CInt -> CInt -> IO CInt {-| __C declaration:__ @apply2@ __defined at:__ @manual\/function_pointers.h 11:12@ __exported by:__ @manual\/function_pointers.h@ -} apply2 = hs_bindgen_4c92d113161d27cf -- __unique:__ @test_manualfunction_pointers_Example_Unsafe_apply1_pointer_arg@ foreign import ccall unsafe "hs_bindgen_2f904bf3ce7a5f06" hs_bindgen_2f904bf3ce7a5f06_base :: FunPtr Void -> Int32 -> IO Int32 -- __unique:__ @test_manualfunction_pointers_Example_Unsafe_apply1_pointer_arg@ hs_bindgen_2f904bf3ce7a5f06 :: FunPtr Int2int -> CInt -> IO CInt -- __unique:__ @test_manualfunction_pointers_Example_Unsafe_apply1_pointer_arg@ hs_bindgen_2f904bf3ce7a5f06 = fromFFIType hs_bindgen_2f904bf3ce7a5f06_base {-| Basically the same as apply1(), but here for illustratory purposes. __C declaration:__ @apply1_pointer_arg@ __defined at:__ @manual\/function_pointers.h 22:12@ __exported by:__ @manual\/function_pointers.h@ -} apply1_pointer_arg :: FunPtr Int2int -> CInt -> IO CInt {-| Basically the same as apply1(), but here for illustratory purposes. __C declaration:__ @apply1_pointer_arg@ __defined at:__ @manual\/function_pointers.h 22:12@ __exported by:__ @manual\/function_pointers.h@ -} apply1_pointer_arg = hs_bindgen_2f904bf3ce7a5f06 -- __unique:__ @test_manualfunction_pointers_Example_Unsafe_apply1_nopointer_arg@ foreign import ccall unsafe "hs_bindgen_966092b638965558" hs_bindgen_966092b638965558_base :: FunPtr Void -> Int32 -> IO Int32 -- __unique:__ @test_manualfunction_pointers_Example_Unsafe_apply1_nopointer_arg@ hs_bindgen_966092b638965558 :: FunPtr Int2int -> CInt -> IO CInt -- __unique:__ @test_manualfunction_pointers_Example_Unsafe_apply1_nopointer_arg@ hs_bindgen_966092b638965558 = fromFFIType hs_bindgen_966092b638965558_base {-| A version of apply1_pointer_arg() that declares to take a argument of function type, rather than a pointer-to-function type. __C declaration:__ @apply1_nopointer_arg@ __defined at:__ @manual\/function_pointers.h 26:12@ __exported by:__ @manual\/function_pointers.h@ -} apply1_nopointer_arg :: FunPtr Int2int -> CInt -> IO CInt {-| A version of apply1_pointer_arg() that declares to take a argument of function type, rather than a pointer-to-function type. __C declaration:__ @apply1_nopointer_arg@ __defined at:__ @manual\/function_pointers.h 26:12@ __exported by:__ @manual\/function_pointers.h@ -} apply1_nopointer_arg = hs_bindgen_966092b638965558 -- __unique:__ @test_manualfunction_pointers_Example_Unsafe_apply1_nopointer_res@ foreign import ccall unsafe "hs_bindgen_99a8340e6e6029c5" hs_bindgen_99a8340e6e6029c5_base :: IO (FunPtr Void) -- __unique:__ @test_manualfunction_pointers_Example_Unsafe_apply1_nopointer_res@ hs_bindgen_99a8340e6e6029c5 :: IO (FunPtr (FunPtr Int2int -> CInt -> IO CInt)) -- __unique:__ @test_manualfunction_pointers_Example_Unsafe_apply1_nopointer_res@ hs_bindgen_99a8340e6e6029c5 = fromFFIType hs_bindgen_99a8340e6e6029c5_base {-| A function returning a pointer to a function like apply1_nopointer(). __C declaration:__ @apply1_nopointer_res@ __defined at:__ @manual\/function_pointers.h 31:21@ __exported by:__ @manual\/function_pointers.h@ -} apply1_nopointer_res :: IO (FunPtr (FunPtr Int2int -> CInt -> IO CInt)) {-| A function returning a pointer to a function like apply1_nopointer(). __C declaration:__ @apply1_nopointer_res@ __defined at:__ @manual\/function_pointers.h 31:21@ __exported by:__ @manual\/function_pointers.h@ -} apply1_nopointer_res = hs_bindgen_99a8340e6e6029c5 -- __unique:__ @test_manualfunction_pointers_Example_get_square@ foreign import ccall unsafe "hs_bindgen_f0adbe322df05825" hs_bindgen_f0adbe322df05825_base :: IO (FunPtr Void) -- __unique:__ @test_manualfunction_pointers_Example_get_square@ hs_bindgen_f0adbe322df05825 :: IO (FunPtr (CInt -> IO CInt)) -- __unique:__ @test_manualfunction_pointers_Example_get_square@ hs_bindgen_f0adbe322df05825 = fromFFIType hs_bindgen_f0adbe322df05825_base {-# NOINLINE square #-} {-| __C declaration:__ @square@ __defined at:__ @manual\/function_pointers.h 5:12@ __exported by:__ @manual\/function_pointers.h@ -} square :: FunPtr (CInt -> IO CInt) {-| __C declaration:__ @square@ __defined at:__ @manual\/function_pointers.h 5:12@ __exported by:__ @manual\/function_pointers.h@ -} square = unsafePerformIO hs_bindgen_f0adbe322df05825 -- __unique:__ @test_manualfunction_pointers_Example_get_plus@ foreign import ccall unsafe "hs_bindgen_ab2a2131b5f9f197" hs_bindgen_ab2a2131b5f9f197_base :: IO (FunPtr Void) -- __unique:__ @test_manualfunction_pointers_Example_get_plus@ hs_bindgen_ab2a2131b5f9f197 :: IO (FunPtr (CInt -> CInt -> IO CInt)) -- __unique:__ @test_manualfunction_pointers_Example_get_plus@ hs_bindgen_ab2a2131b5f9f197 = fromFFIType hs_bindgen_ab2a2131b5f9f197_base {-# NOINLINE plus #-} {-| __C declaration:__ @plus@ __defined at:__ @manual\/function_pointers.h 7:12@ __exported by:__ @manual\/function_pointers.h@ -} plus :: FunPtr (CInt -> CInt -> IO CInt) {-| __C declaration:__ @plus@ __defined at:__ @manual\/function_pointers.h 7:12@ __exported by:__ @manual\/function_pointers.h@ -} plus = unsafePerformIO hs_bindgen_ab2a2131b5f9f197 -- __unique:__ @test_manualfunction_pointers_Example_get_apply1@ foreign import ccall unsafe "hs_bindgen_b3bb0146641acd39" hs_bindgen_b3bb0146641acd39_base :: IO (FunPtr Void) -- __unique:__ @test_manualfunction_pointers_Example_get_apply1@ hs_bindgen_b3bb0146641acd39 :: IO (FunPtr (FunPtr (CInt -> IO CInt) -> CInt -> IO CInt)) -- __unique:__ @test_manualfunction_pointers_Example_get_apply1@ hs_bindgen_b3bb0146641acd39 = fromFFIType hs_bindgen_b3bb0146641acd39_base {-# NOINLINE apply1 #-} {-| __C declaration:__ @apply1@ __defined at:__ @manual\/function_pointers.h 9:12@ __exported by:__ @manual\/function_pointers.h@ -} apply1 :: FunPtr (FunPtr (CInt -> IO CInt) -> CInt -> IO CInt) {-| __C declaration:__ @apply1@ __defined at:__ @manual\/function_pointers.h 9:12@ __exported by:__ @manual\/function_pointers.h@ -} apply1 = unsafePerformIO hs_bindgen_b3bb0146641acd39 -- __unique:__ @test_manualfunction_pointers_Example_get_apply2@ foreign import ccall unsafe "hs_bindgen_78245c4946e6da00" hs_bindgen_78245c4946e6da00_base :: IO (FunPtr Void) -- __unique:__ @test_manualfunction_pointers_Example_get_apply2@ hs_bindgen_78245c4946e6da00 :: IO (FunPtr (FunPtr (CInt -> CInt -> IO CInt) -> CInt -> CInt -> IO CInt)) -- __unique:__ @test_manualfunction_pointers_Example_get_apply2@ hs_bindgen_78245c4946e6da00 = fromFFIType hs_bindgen_78245c4946e6da00_base {-# NOINLINE apply2 #-} {-| __C declaration:__ @apply2@ __defined at:__ @manual\/function_pointers.h 11:12@ __exported by:__ @manual\/function_pointers.h@ -} apply2 :: FunPtr (FunPtr (CInt -> CInt -> IO CInt) -> CInt -> CInt -> IO CInt) {-| __C declaration:__ @apply2@ __defined at:__ @manual\/function_pointers.h 11:12@ __exported by:__ @manual\/function_pointers.h@ -} apply2 = unsafePerformIO hs_bindgen_78245c4946e6da00 -- __unique:__ @test_manualfunction_pointers_Example_get_apply1_pointer_arg@ foreign import ccall unsafe "hs_bindgen_00276448b1e8af8a" hs_bindgen_00276448b1e8af8a_base :: IO (FunPtr Void) -- __unique:__ @test_manualfunction_pointers_Example_get_apply1_pointer_arg@ hs_bindgen_00276448b1e8af8a :: IO (FunPtr (FunPtr Int2int -> CInt -> IO CInt)) -- __unique:__ @test_manualfunction_pointers_Example_get_apply1_pointer_arg@ hs_bindgen_00276448b1e8af8a = fromFFIType hs_bindgen_00276448b1e8af8a_base {-# NOINLINE apply1_pointer_arg #-} {-| Basically the same as apply1(), but here for illustratory purposes. __C declaration:__ @apply1_pointer_arg@ __defined at:__ @manual\/function_pointers.h 22:12@ __exported by:__ @manual\/function_pointers.h@ -} apply1_pointer_arg :: FunPtr (FunPtr Int2int -> CInt -> IO CInt) {-| Basically the same as apply1(), but here for illustratory purposes. __C declaration:__ @apply1_pointer_arg@ __defined at:__ @manual\/function_pointers.h 22:12@ __exported by:__ @manual\/function_pointers.h@ -} apply1_pointer_arg = unsafePerformIO hs_bindgen_00276448b1e8af8a -- __unique:__ @test_manualfunction_pointers_Example_get_apply1_nopointer_arg@ foreign import ccall unsafe "hs_bindgen_00f9010b80cdee19" hs_bindgen_00f9010b80cdee19_base :: IO (FunPtr Void) -- __unique:__ @test_manualfunction_pointers_Example_get_apply1_nopointer_arg@ hs_bindgen_00f9010b80cdee19 :: IO (FunPtr (FunPtr Int2int -> CInt -> IO CInt)) -- __unique:__ @test_manualfunction_pointers_Example_get_apply1_nopointer_arg@ hs_bindgen_00f9010b80cdee19 = fromFFIType hs_bindgen_00f9010b80cdee19_base {-# NOINLINE apply1_nopointer_arg #-} {-| A version of apply1_pointer_arg() that declares to take a argument of function type, rather than a pointer-to-function type. __C declaration:__ @apply1_nopointer_arg@ __defined at:__ @manual\/function_pointers.h 26:12@ __exported by:__ @manual\/function_pointers.h@ -} apply1_nopointer_arg :: FunPtr (FunPtr Int2int -> CInt -> IO CInt) {-| A version of apply1_pointer_arg() that declares to take a argument of function type, rather than a pointer-to-function type. __C declaration:__ @apply1_nopointer_arg@ __defined at:__ @manual\/function_pointers.h 26:12@ __exported by:__ @manual\/function_pointers.h@ -} apply1_nopointer_arg = unsafePerformIO hs_bindgen_00f9010b80cdee19 -- __unique:__ @test_manualfunction_pointers_Example_get_apply1_nopointer_res@ foreign import ccall unsafe "hs_bindgen_16929b4528263721" hs_bindgen_16929b4528263721_base :: IO (FunPtr Void) -- __unique:__ @test_manualfunction_pointers_Example_get_apply1_nopointer_res@ hs_bindgen_16929b4528263721 :: IO (FunPtr (IO (FunPtr (FunPtr Int2int -> CInt -> IO CInt)))) -- __unique:__ @test_manualfunction_pointers_Example_get_apply1_nopointer_res@ hs_bindgen_16929b4528263721 = fromFFIType hs_bindgen_16929b4528263721_base {-# NOINLINE apply1_nopointer_res #-} {-| A function returning a pointer to a function like apply1_nopointer(). __C declaration:__ @apply1_nopointer_res@ __defined at:__ @manual\/function_pointers.h 31:21@ __exported by:__ @manual\/function_pointers.h@ -} apply1_nopointer_res :: FunPtr (IO (FunPtr (FunPtr Int2int -> CInt -> IO CInt))) {-| A function returning a pointer to a function like apply1_nopointer(). __C declaration:__ @apply1_nopointer_res@ __defined at:__ @manual\/function_pointers.h 31:21@ __exported by:__ @manual\/function_pointers.h@ -} apply1_nopointer_res = unsafePerformIO hs_bindgen_16929b4528263721 -- __unique:__ @test_manualfunction_pointers_Example_get_apply1_nopointer_var@ foreign import ccall unsafe "hs_bindgen_8ca6ae5d7bf88149" hs_bindgen_8ca6ae5d7bf88149_base :: IO (Ptr Void) -- __unique:__ @test_manualfunction_pointers_Example_get_apply1_nopointer_var@ hs_bindgen_8ca6ae5d7bf88149 :: IO (PtrConst (FunPtr (FunPtr Int2int -> CInt -> IO CInt))) -- __unique:__ @test_manualfunction_pointers_Example_get_apply1_nopointer_var@ hs_bindgen_8ca6ae5d7bf88149 = fromFFIType hs_bindgen_8ca6ae5d7bf88149_base {-# NOINLINE hs_bindgen_505081298c324425 #-} {-| A global variable pointing to a function like apply1_nopointer(). __C declaration:__ @apply1_nopointer_var@ __defined at:__ @manual\/function_pointers.h 34:21@ __exported by:__ @manual\/function_pointers.h@ __unique:__ @test_manualfunction_pointers_Example_apply1_nopointer_var@ -} hs_bindgen_505081298c324425 :: PtrConst (FunPtr (FunPtr Int2int -> CInt -> IO CInt)) {-| A global variable pointing to a function like apply1_nopointer(). __C declaration:__ @apply1_nopointer_var@ __defined at:__ @manual\/function_pointers.h 34:21@ __exported by:__ @manual\/function_pointers.h@ __unique:__ @test_manualfunction_pointers_Example_apply1_nopointer_var@ -} hs_bindgen_505081298c324425 = unsafePerformIO hs_bindgen_8ca6ae5d7bf88149 {-# NOINLINE apply1_nopointer_var #-} apply1_nopointer_var :: FunPtr (FunPtr Int2int -> CInt -> IO CInt) apply1_nopointer_var = unsafePerformIO (peek hs_bindgen_505081298c324425) -- __unique:__ @test_manualfunction_pointers_Example_get_apply1_struct@ foreign import ccall unsafe "hs_bindgen_33a4962ebf2e9daf" hs_bindgen_33a4962ebf2e9daf_base :: IO (Ptr Void) -- __unique:__ @test_manualfunction_pointers_Example_get_apply1_struct@ hs_bindgen_33a4962ebf2e9daf :: IO (PtrConst Apply1Struct) -- __unique:__ @test_manualfunction_pointers_Example_get_apply1_struct@ hs_bindgen_33a4962ebf2e9daf = fromFFIType hs_bindgen_33a4962ebf2e9daf_base {-# NOINLINE hs_bindgen_96ffcf57d318ddc0 #-} {-| __C declaration:__ @apply1_struct@ __defined at:__ @manual\/function_pointers.h 40:34@ __exported by:__ @manual\/function_pointers.h@ __unique:__ @test_manualfunction_pointers_Example_apply1_struct@ -} hs_bindgen_96ffcf57d318ddc0 :: PtrConst Apply1Struct {-| __C declaration:__ @apply1_struct@ __defined at:__ @manual\/function_pointers.h 40:34@ __exported by:__ @manual\/function_pointers.h@ __unique:__ @test_manualfunction_pointers_Example_apply1_struct@ -} hs_bindgen_96ffcf57d318ddc0 = unsafePerformIO hs_bindgen_33a4962ebf2e9daf {-# NOINLINE apply1_struct #-} apply1_struct :: Apply1Struct apply1_struct = unsafePerformIO (peek hs_bindgen_96ffcf57d318ddc0) -- __unique:__ @test_manualfunction_pointers_Example_get_apply1_union@ foreign import ccall unsafe "hs_bindgen_d1ddd3b607c95874" hs_bindgen_d1ddd3b607c95874_base :: IO (Ptr Void) -- __unique:__ @test_manualfunction_pointers_Example_get_apply1_union@ hs_bindgen_d1ddd3b607c95874 :: IO (PtrConst Apply1Union) -- __unique:__ @test_manualfunction_pointers_Example_get_apply1_union@ hs_bindgen_d1ddd3b607c95874 = fromFFIType hs_bindgen_d1ddd3b607c95874_base {-# NOINLINE hs_bindgen_8368fc70f5e0aec5 #-} {-| __C declaration:__ @apply1_union@ __defined at:__ @manual\/function_pointers.h 46:32@ __exported by:__ @manual\/function_pointers.h@ __unique:__ @test_manualfunction_pointers_Example_apply1_union@ -} hs_bindgen_8368fc70f5e0aec5 :: PtrConst Apply1Union {-| __C declaration:__ @apply1_union@ __defined at:__ @manual\/function_pointers.h 46:32@ __exported by:__ @manual\/function_pointers.h@ __unique:__ @test_manualfunction_pointers_Example_apply1_union@ -} hs_bindgen_8368fc70f5e0aec5 = unsafePerformIO hs_bindgen_d1ddd3b607c95874 {-# NOINLINE apply1_union #-} apply1_union :: Apply1Union apply1_union = unsafePerformIO (peek hs_bindgen_8368fc70f5e0aec5)