49 lines
1.3 KiB
Haskell
49 lines
1.3 KiB
Haskell
|
|
{-# LANGUAGE CApiFFI #-}
|
||
|
|
{-# LANGUAGE NoImplicitPrelude #-}
|
||
|
|
{-# LANGUAGE TemplateHaskell #-}
|
||
|
|
{-# OPTIONS_HADDOCK prune #-}
|
||
|
|
|
||
|
|
module GarnetRs.Safe where
|
||
|
|
|
||
|
|
import qualified Foreign.C as FC
|
||
|
|
import qualified GHC.Ptr as Ptr
|
||
|
|
import qualified HsBindgen.Runtime.Internal.CAPI
|
||
|
|
import qualified HsBindgen.Runtime.Internal.HasFFIType
|
||
|
|
import qualified HsBindgen.Runtime.PtrConst
|
||
|
|
import Data.Void (Void)
|
||
|
|
import Prelude (IO)
|
||
|
|
|
||
|
|
$(HsBindgen.Runtime.Internal.CAPI.addCSource (HsBindgen.Runtime.Internal.CAPI.unlines
|
||
|
|
[ "#include <garnet_rs.h>"
|
||
|
|
, "void hs_bindgen_433ea2a26af4e593 ("
|
||
|
|
, " char const *arg1"
|
||
|
|
, ")"
|
||
|
|
, "{"
|
||
|
|
, " hello(arg1);"
|
||
|
|
, "}"
|
||
|
|
]))
|
||
|
|
|
||
|
|
-- __unique:__ @com_garnet_GarnetRs_Safe_hello@
|
||
|
|
foreign import ccall safe "hs_bindgen_433ea2a26af4e593" hs_bindgen_433ea2a26af4e593_base ::
|
||
|
|
Ptr.Ptr Void
|
||
|
|
-> IO ()
|
||
|
|
|
||
|
|
-- __unique:__ @com_garnet_GarnetRs_Safe_hello@
|
||
|
|
hs_bindgen_433ea2a26af4e593 ::
|
||
|
|
HsBindgen.Runtime.PtrConst.PtrConst FC.CChar
|
||
|
|
-> IO ()
|
||
|
|
hs_bindgen_433ea2a26af4e593 =
|
||
|
|
HsBindgen.Runtime.Internal.HasFFIType.fromFFIType hs_bindgen_433ea2a26af4e593_base
|
||
|
|
|
||
|
|
{-| __C declaration:__ @hello@
|
||
|
|
|
||
|
|
__defined at:__ @garnet_rs.h 6:6@
|
||
|
|
|
||
|
|
__exported by:__ @garnet_rs.h@
|
||
|
|
-}
|
||
|
|
hello ::
|
||
|
|
HsBindgen.Runtime.PtrConst.PtrConst FC.CChar
|
||
|
|
-- ^ __C declaration:__ @c@
|
||
|
|
-> IO ()
|
||
|
|
hello = hs_bindgen_433ea2a26af4e593
|