49 lines
1.3 KiB
Haskell
49 lines
1.3 KiB
Haskell
|
|
{-# LANGUAGE CApiFFI #-}
|
||
|
|
{-# LANGUAGE NoImplicitPrelude #-}
|
||
|
|
{-# LANGUAGE TemplateHaskell #-}
|
||
|
|
{-# OPTIONS_HADDOCK prune #-}
|
||
|
|
|
||
|
|
module GarnetRs.Unsafe 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_2dfe97662a4d6377 ("
|
||
|
|
, " char const *arg1"
|
||
|
|
, ")"
|
||
|
|
, "{"
|
||
|
|
, " hello(arg1);"
|
||
|
|
, "}"
|
||
|
|
]))
|
||
|
|
|
||
|
|
-- __unique:__ @com_garnet_GarnetRs_Unsafe_hello@
|
||
|
|
foreign import ccall unsafe "hs_bindgen_2dfe97662a4d6377" hs_bindgen_2dfe97662a4d6377_base ::
|
||
|
|
Ptr.Ptr Void
|
||
|
|
-> IO ()
|
||
|
|
|
||
|
|
-- __unique:__ @com_garnet_GarnetRs_Unsafe_hello@
|
||
|
|
hs_bindgen_2dfe97662a4d6377 ::
|
||
|
|
HsBindgen.Runtime.PtrConst.PtrConst FC.CChar
|
||
|
|
-> IO ()
|
||
|
|
hs_bindgen_2dfe97662a4d6377 =
|
||
|
|
HsBindgen.Runtime.Internal.HasFFIType.fromFFIType hs_bindgen_2dfe97662a4d6377_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_2dfe97662a4d6377
|