-- addDependentFile musl-include/x86_64/bits/stdint.h -- addDependentFile musl-include/x86_64/bits/alltypes.h -- addDependentFile musl-include/x86_64/stdint.h -- addDependentFile examples/golden/program-analysis/program_slicing_simple.h -- #include -- signed int hs_bindgen_48dbbf4b09b5b3c1 ( -- uint64_t arg1, -- uint32_t arg2 -- ) -- { -- return bar(arg1, arg2); -- } -- signed int hs_bindgen_fe855d53295ba8ab ( -- uint64_t arg1, -- uint32_t arg2 -- ) -- { -- return bar(arg1, arg2); -- } -- /* test_programanalysisprogram_slici_Example_get_bar */ -- __attribute__ ((const)) -- signed int (*hs_bindgen_993162e0dadfa2c9 (void)) ( -- uint64_t arg1, -- uint32_t arg2 -- ) -- { -- return &bar; -- } {-| __C declaration:__ @uint32_t@ __defined at:__ @bits\/alltypes.h 131:25@ __exported by:__ @program-analysis\/program_slicing_simple.h@ -} newtype Uint32_t = Uint32_t {unwrapUint32_t :: CUInt} {- ^ __C declaration:__ @uint32_t@ __defined at:__ @bits\/alltypes.h 131:25@ __exported by:__ @program-analysis\/program_slicing_simple.h@ -} deriving stock (Eq, Ord, Read, Show) deriving newtype (StaticSize, ReadRaw, WriteRaw, Storable, HasFFIType, Prim, Bitfield, Bits, Bounded, Enum, FiniteBits, Integral, Ix, Num, Real) instance TyEq ty (CFieldType Uint32_t "unwrapUint32_t") => HasField "unwrapUint32_t" (Ptr Uint32_t) (Ptr ty) where getField = fromPtr (Proxy @"unwrapUint32_t") instance HasCField Uint32_t "unwrapUint32_t" where type CFieldType Uint32_t "unwrapUint32_t" = CUInt offset# = \_ -> \_ -> 0 {-| __C declaration:__ @struct foo@ __defined at:__ @program-analysis\/program_slicing_simple.h 3:8@ __exported by:__ @program-analysis\/program_slicing_simple.h@ -} data Foo = Foo {foo_sixty_four :: Foreign.Word64 {- ^ __C declaration:__ @sixty_four@ __defined at:__ @program-analysis\/program_slicing_simple.h 4:12@ __exported by:__ @program-analysis\/program_slicing_simple.h@ -}, foo_thirty_two :: Uint32_t {- ^ __C declaration:__ @thirty_two@ __defined at:__ @program-analysis\/program_slicing_simple.h 5:12@ __exported by:__ @program-analysis\/program_slicing_simple.h@ -}} {- ^ __C declaration:__ @struct foo@ __defined at:__ @program-analysis\/program_slicing_simple.h 3:8@ __exported by:__ @program-analysis\/program_slicing_simple.h@ -} deriving stock (Eq, Show) instance Storable Foo where sizeOf = \_ -> 16 :: Int alignment = \_ -> 8 :: Int peek = \ptr_0 -> (pure Foo <*> peek (Proxy @"foo_sixty_four") ptr_0) <*> peek (Proxy @"foo_thirty_two") ptr_0 poke = \ptr_1 -> \s_2 -> case s_2 of Foo foo_sixty_four_3 foo_thirty_two_4 -> poke (Proxy @"foo_sixty_four") ptr_1 foo_sixty_four_3 >> poke (Proxy @"foo_thirty_two") ptr_1 foo_thirty_two_4 instance HasCField Foo "foo_sixty_four" where type CFieldType Foo "foo_sixty_four" = Foreign.Word64 offset# = \_ -> \_ -> 0 instance TyEq ty (CFieldType Foo "foo_sixty_four") => HasField "foo_sixty_four" (Ptr Foo) (Ptr ty) where getField = fromPtr (Proxy @"foo_sixty_four") instance HasCField Foo "foo_thirty_two" where type CFieldType Foo "foo_thirty_two" = Uint32_t offset# = \_ -> \_ -> 8 instance TyEq ty (CFieldType Foo "foo_thirty_two") => HasField "foo_thirty_two" (Ptr Foo) (Ptr ty) where getField = fromPtr (Proxy @"foo_thirty_two") -- __unique:__ @test_programanalysisprogram_slici_Example_Safe_bar@ foreign import ccall safe "hs_bindgen_48dbbf4b09b5b3c1" hs_bindgen_48dbbf4b09b5b3c1_base :: Word64 -> Word32 -> IO Int32 -- __unique:__ @test_programanalysisprogram_slici_Example_Safe_bar@ hs_bindgen_48dbbf4b09b5b3c1 :: Foreign.Word64 -> Uint32_t -> IO CInt -- __unique:__ @test_programanalysisprogram_slici_Example_Safe_bar@ hs_bindgen_48dbbf4b09b5b3c1 = fromFFIType hs_bindgen_48dbbf4b09b5b3c1_base {-| __C declaration:__ @bar@ __defined at:__ @program-analysis\/program_slicing_simple.h 8:5@ __exported by:__ @program-analysis\/program_slicing_simple.h@ -} bar :: Foreign.Word64 -> Uint32_t -> IO CInt {-| __C declaration:__ @bar@ __defined at:__ @program-analysis\/program_slicing_simple.h 8:5@ __exported by:__ @program-analysis\/program_slicing_simple.h@ -} bar = hs_bindgen_48dbbf4b09b5b3c1 -- __unique:__ @test_programanalysisprogram_slici_Example_Unsafe_bar@ foreign import ccall unsafe "hs_bindgen_fe855d53295ba8ab" hs_bindgen_fe855d53295ba8ab_base :: Word64 -> Word32 -> IO Int32 -- __unique:__ @test_programanalysisprogram_slici_Example_Unsafe_bar@ hs_bindgen_fe855d53295ba8ab :: Foreign.Word64 -> Uint32_t -> IO CInt -- __unique:__ @test_programanalysisprogram_slici_Example_Unsafe_bar@ hs_bindgen_fe855d53295ba8ab = fromFFIType hs_bindgen_fe855d53295ba8ab_base {-| __C declaration:__ @bar@ __defined at:__ @program-analysis\/program_slicing_simple.h 8:5@ __exported by:__ @program-analysis\/program_slicing_simple.h@ -} bar :: Foreign.Word64 -> Uint32_t -> IO CInt {-| __C declaration:__ @bar@ __defined at:__ @program-analysis\/program_slicing_simple.h 8:5@ __exported by:__ @program-analysis\/program_slicing_simple.h@ -} bar = hs_bindgen_fe855d53295ba8ab -- __unique:__ @test_programanalysisprogram_slici_Example_get_bar@ foreign import ccall unsafe "hs_bindgen_993162e0dadfa2c9" hs_bindgen_993162e0dadfa2c9_base :: IO (FunPtr Void) -- __unique:__ @test_programanalysisprogram_slici_Example_get_bar@ hs_bindgen_993162e0dadfa2c9 :: IO (FunPtr (Foreign.Word64 -> Uint32_t -> IO CInt)) -- __unique:__ @test_programanalysisprogram_slici_Example_get_bar@ hs_bindgen_993162e0dadfa2c9 = fromFFIType hs_bindgen_993162e0dadfa2c9_base {-# NOINLINE bar #-} {-| __C declaration:__ @bar@ __defined at:__ @program-analysis\/program_slicing_simple.h 8:5@ __exported by:__ @program-analysis\/program_slicing_simple.h@ -} bar :: FunPtr (Foreign.Word64 -> Uint32_t -> IO CInt) {-| __C declaration:__ @bar@ __defined at:__ @program-analysis\/program_slicing_simple.h 8:5@ __exported by:__ @program-analysis\/program_slicing_simple.h@ -} bar = unsafePerformIO hs_bindgen_993162e0dadfa2c9