110 lines
2.9 KiB
Haskell
Raw Normal View History

{-# 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)
2026-02-19 11:11:23 +00:00
import GarnetRs
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);"
, "}"
2026-02-19 11:11:23 +00:00
, "void hs_bindgen_51157946af5519c9 ("
, " struct T const *arg1"
, ")"
, "{"
, " hello_struct(arg1);"
, "}"
, "void hs_bindgen_7de06f1fd827ca60 ("
, " struct Shape const *arg1"
, ")"
, "{"
, " hello_shape(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@
2026-02-19 11:11:23 +00:00
__defined at:__ @garnet_rs.h 32:6@
__exported by:__ @garnet_rs.h@
-}
hello ::
HsBindgen.Runtime.PtrConst.PtrConst FC.CChar
-- ^ __C declaration:__ @c@
-> IO ()
hello = hs_bindgen_433ea2a26af4e593
2026-02-19 11:11:23 +00:00
-- __unique:__ @com_garnet_GarnetRs_Safe_hello_struct@
foreign import ccall safe "hs_bindgen_51157946af5519c9" hs_bindgen_51157946af5519c9_base ::
Ptr.Ptr Void
-> IO ()
-- __unique:__ @com_garnet_GarnetRs_Safe_hello_struct@
hs_bindgen_51157946af5519c9 ::
HsBindgen.Runtime.PtrConst.PtrConst T
-> IO ()
hs_bindgen_51157946af5519c9 =
HsBindgen.Runtime.Internal.HasFFIType.fromFFIType hs_bindgen_51157946af5519c9_base
{-| __C declaration:__ @hello_struct@
__defined at:__ @garnet_rs.h 34:6@
__exported by:__ @garnet_rs.h@
-}
hello_struct ::
HsBindgen.Runtime.PtrConst.PtrConst T
-- ^ __C declaration:__ @t@
-> IO ()
hello_struct = hs_bindgen_51157946af5519c9
-- __unique:__ @com_garnet_GarnetRs_Safe_hello_shape@
foreign import ccall safe "hs_bindgen_7de06f1fd827ca60" hs_bindgen_7de06f1fd827ca60_base ::
Ptr.Ptr Void
-> IO ()
-- __unique:__ @com_garnet_GarnetRs_Safe_hello_shape@
hs_bindgen_7de06f1fd827ca60 ::
HsBindgen.Runtime.PtrConst.PtrConst Shape
-> IO ()
hs_bindgen_7de06f1fd827ca60 =
HsBindgen.Runtime.Internal.HasFFIType.fromFFIType hs_bindgen_7de06f1fd827ca60_base
{-| __C declaration:__ @hello_shape@
__defined at:__ @garnet_rs.h 36:6@
__exported by:__ @garnet_rs.h@
-}
hello_shape ::
HsBindgen.Runtime.PtrConst.PtrConst Shape
-- ^ __C declaration:__ @s@
-> IO ()
hello_shape = hs_bindgen_7de06f1fd827ca60