hs-bindgen-1.0.0.0: test-artefacts/fixtures/program-analysis/program-slicing/macro_selected/Example/Safe.hs
{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_HADDOCK prune #-}
module Example.Safe
( Example.Safe.foo
, Example.Safe.bar
)
where
import qualified HsBindgen.Runtime.Support as BG
import qualified HsBindgen.Runtime.Support.CAPI
import Example
import Prelude (IO)
$(HsBindgen.Runtime.Support.CAPI.addCSource (HsBindgen.Runtime.Support.CAPI.unlines
[ "#include <program-analysis/program-slicing/macro_selected.h>"
, "void hs_bindgen_27fdf7030b0bb40d ("
, " T arg1"
, ")"
, "{"
, " (foo)(arg1);"
, "}"
, "void hs_bindgen_ef8f97cf27661c20 ("
, " U arg1"
, ")"
, "{"
, " (bar)(arg1);"
, "}"
]))
-- __unique:__ @test_programanalysisprogramslici_Example_Safe_foo@
foreign import ccall safe "hs_bindgen_27fdf7030b0bb40d" hs_bindgen_27fdf7030b0bb40d_base ::
BG.CInt
-> IO ()
-- __unique:__ @test_programanalysisprogramslici_Example_Safe_foo@
hs_bindgen_27fdf7030b0bb40d ::
T
-> IO ()
hs_bindgen_27fdf7030b0bb40d =
\x0 ->
hs_bindgen_27fdf7030b0bb40d_base (BG.toFFIType x0)
{-| __C declaration:__ @foo@
__defined at:__ @program-analysis\/program-slicing\/macro_selected.h 5:6@
__exported by:__ @program-analysis\/program-slicing\/macro_selected.h@
-}
foo ::
T
-- ^ __C declaration:__ @x@
-> IO ()
foo = hs_bindgen_27fdf7030b0bb40d
-- __unique:__ @test_programanalysisprogramslici_Example_Safe_bar@
foreign import ccall safe "hs_bindgen_ef8f97cf27661c20" hs_bindgen_ef8f97cf27661c20_base ::
BG.CInt
-> IO ()
-- __unique:__ @test_programanalysisprogramslici_Example_Safe_bar@
hs_bindgen_ef8f97cf27661c20 ::
U
-> IO ()
hs_bindgen_ef8f97cf27661c20 =
\x0 ->
hs_bindgen_ef8f97cf27661c20_base (BG.toFFIType x0)
{-| __C declaration:__ @bar@
__defined at:__ @program-analysis\/program-slicing\/macro_selected.h 10:6@
__exported by:__ @program-analysis\/program-slicing\/macro_selected.h@
-}
bar ::
U
-- ^ __C declaration:__ @x@
-> IO ()
bar = hs_bindgen_ef8f97cf27661c20