hs-bindgen-1.0.0.0: test-artefacts/fixtures/edge-cases/iterator/Example/FunPtr.hs
{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_HADDOCK prune #-}
module Example.FunPtr
( Example.FunPtr.makeToggle
, Example.FunPtr.toggleNext
, Example.FunPtr.releaseToggle
, Example.FunPtr.makeCounter
, Example.FunPtr.counterNext
, Example.FunPtr.releaseCounter
, Example.FunPtr.makeVarCounter
, Example.FunPtr.varCounterNext
, Example.FunPtr.releaseVarCounter
)
where
import qualified HsBindgen.Runtime.Support as BG
import qualified HsBindgen.Runtime.Support.CAPI
import Example
import Prelude (IO, fmap)
$(HsBindgen.Runtime.Support.CAPI.addCSource (HsBindgen.Runtime.Support.CAPI.unlines
[ "#include <edge-cases/iterator.h>"
, "/* test_edgecasesiterator_Example_get_makeToggle */"
, "__attribute__ ((const))"
, "Toggle (*hs_bindgen_ccdad25a057f8efd (void)) ("
, " _Bool arg1"
, ")"
, "{"
, " return &makeToggle;"
, "}"
, "/* test_edgecasesiterator_Example_get_toggleNext */"
, "__attribute__ ((const))"
, "_Bool (*hs_bindgen_fd8e19ba2d78baa9 (void)) ("
, " Toggle arg1"
, ")"
, "{"
, " return &toggleNext;"
, "}"
, "/* test_edgecasesiterator_Example_get_releaseToggle */"
, "__attribute__ ((const))"
, "void (*hs_bindgen_780e490698de9df1 (void)) ("
, " Toggle arg1"
, ")"
, "{"
, " return &releaseToggle;"
, "}"
, "/* test_edgecasesiterator_Example_get_makeCounter */"
, "__attribute__ ((const))"
, "Counter (*hs_bindgen_517dd14dbdb5e3ba (void)) ("
, " signed int arg1,"
, " signed int arg2"
, ")"
, "{"
, " return &makeCounter;"
, "}"
, "/* test_edgecasesiterator_Example_get_counterNext */"
, "__attribute__ ((const))"
, "signed int (*hs_bindgen_28d81dd8ce6aca30 (void)) ("
, " Counter arg1"
, ")"
, "{"
, " return &counterNext;"
, "}"
, "/* test_edgecasesiterator_Example_get_releaseCounter */"
, "__attribute__ ((const))"
, "void (*hs_bindgen_849de94baad0430a (void)) ("
, " Counter arg1"
, ")"
, "{"
, " return &releaseCounter;"
, "}"
, "/* test_edgecasesiterator_Example_get_makeVarCounter */"
, "__attribute__ ((const))"
, "VarCounter (*hs_bindgen_8eea20d99febeef3 (void)) ("
, " signed int arg1"
, ")"
, "{"
, " return &makeVarCounter;"
, "}"
, "/* test_edgecasesiterator_Example_get_varCounterNext */"
, "__attribute__ ((const))"
, "signed int (*hs_bindgen_3ae982266c863a3d (void)) ("
, " VarCounter arg1,"
, " signed int arg2"
, ")"
, "{"
, " return &varCounterNext;"
, "}"
, "/* test_edgecasesiterator_Example_get_releaseVarCounter */"
, "__attribute__ ((const))"
, "void (*hs_bindgen_802a723805cb041f (void)) ("
, " VarCounter arg1"
, ")"
, "{"
, " return &releaseVarCounter;"
, "}"
]))
-- __unique:__ @test_edgecasesiterator_Example_get_makeToggle@
foreign import ccall unsafe "hs_bindgen_ccdad25a057f8efd" hs_bindgen_ccdad25a057f8efd_base ::
IO (BG.FunPtr BG.Void)
-- __unique:__ @test_edgecasesiterator_Example_get_makeToggle@
hs_bindgen_ccdad25a057f8efd :: IO (BG.FunPtr (BG.CBool -> IO Toggle))
hs_bindgen_ccdad25a057f8efd =
fmap BG.fromFFIType hs_bindgen_ccdad25a057f8efd_base
{-# NOINLINE makeToggle #-}
{-| __C declaration:__ @makeToggle@
__defined at:__ @edge-cases\/iterator.h 4:8@
__exported by:__ @edge-cases\/iterator.h@
-}
makeToggle :: BG.FunPtr (BG.CBool -> IO Toggle)
makeToggle =
BG.unsafePerformIO hs_bindgen_ccdad25a057f8efd
-- __unique:__ @test_edgecasesiterator_Example_get_toggleNext@
foreign import ccall unsafe "hs_bindgen_fd8e19ba2d78baa9" hs_bindgen_fd8e19ba2d78baa9_base ::
IO (BG.FunPtr BG.Void)
-- __unique:__ @test_edgecasesiterator_Example_get_toggleNext@
hs_bindgen_fd8e19ba2d78baa9 :: IO (BG.FunPtr (Toggle -> IO BG.CBool))
hs_bindgen_fd8e19ba2d78baa9 =
fmap BG.fromFFIType hs_bindgen_fd8e19ba2d78baa9_base
{-# NOINLINE toggleNext #-}
{-| __C declaration:__ @toggleNext@
__defined at:__ @edge-cases\/iterator.h 5:6@
__exported by:__ @edge-cases\/iterator.h@
-}
toggleNext :: BG.FunPtr (Toggle -> IO BG.CBool)
toggleNext =
BG.unsafePerformIO hs_bindgen_fd8e19ba2d78baa9
-- __unique:__ @test_edgecasesiterator_Example_get_releaseToggle@
foreign import ccall unsafe "hs_bindgen_780e490698de9df1" hs_bindgen_780e490698de9df1_base ::
IO (BG.FunPtr BG.Void)
-- __unique:__ @test_edgecasesiterator_Example_get_releaseToggle@
hs_bindgen_780e490698de9df1 :: IO (BG.FunPtr (Toggle -> IO ()))
hs_bindgen_780e490698de9df1 =
fmap BG.fromFFIType hs_bindgen_780e490698de9df1_base
{-# NOINLINE releaseToggle #-}
{-| __C declaration:__ @releaseToggle@
__defined at:__ @edge-cases\/iterator.h 6:6@
__exported by:__ @edge-cases\/iterator.h@
-}
releaseToggle :: BG.FunPtr (Toggle -> IO ())
releaseToggle =
BG.unsafePerformIO hs_bindgen_780e490698de9df1
-- __unique:__ @test_edgecasesiterator_Example_get_makeCounter@
foreign import ccall unsafe "hs_bindgen_517dd14dbdb5e3ba" hs_bindgen_517dd14dbdb5e3ba_base ::
IO (BG.FunPtr BG.Void)
-- __unique:__ @test_edgecasesiterator_Example_get_makeCounter@
hs_bindgen_517dd14dbdb5e3ba :: IO (BG.FunPtr (BG.CInt -> BG.CInt -> IO Counter))
hs_bindgen_517dd14dbdb5e3ba =
fmap BG.fromFFIType hs_bindgen_517dd14dbdb5e3ba_base
{-# NOINLINE makeCounter #-}
{-| __C declaration:__ @makeCounter@
__defined at:__ @edge-cases\/iterator.h 11:9@
__exported by:__ @edge-cases\/iterator.h@
-}
makeCounter :: BG.FunPtr (BG.CInt -> BG.CInt -> IO Counter)
makeCounter =
BG.unsafePerformIO hs_bindgen_517dd14dbdb5e3ba
-- __unique:__ @test_edgecasesiterator_Example_get_counterNext@
foreign import ccall unsafe "hs_bindgen_28d81dd8ce6aca30" hs_bindgen_28d81dd8ce6aca30_base ::
IO (BG.FunPtr BG.Void)
-- __unique:__ @test_edgecasesiterator_Example_get_counterNext@
hs_bindgen_28d81dd8ce6aca30 :: IO (BG.FunPtr (Counter -> IO BG.CInt))
hs_bindgen_28d81dd8ce6aca30 =
fmap BG.fromFFIType hs_bindgen_28d81dd8ce6aca30_base
{-# NOINLINE counterNext #-}
{-| __C declaration:__ @counterNext@
__defined at:__ @edge-cases\/iterator.h 12:5@
__exported by:__ @edge-cases\/iterator.h@
-}
counterNext :: BG.FunPtr (Counter -> IO BG.CInt)
counterNext =
BG.unsafePerformIO hs_bindgen_28d81dd8ce6aca30
-- __unique:__ @test_edgecasesiterator_Example_get_releaseCounter@
foreign import ccall unsafe "hs_bindgen_849de94baad0430a" hs_bindgen_849de94baad0430a_base ::
IO (BG.FunPtr BG.Void)
-- __unique:__ @test_edgecasesiterator_Example_get_releaseCounter@
hs_bindgen_849de94baad0430a :: IO (BG.FunPtr (Counter -> IO ()))
hs_bindgen_849de94baad0430a =
fmap BG.fromFFIType hs_bindgen_849de94baad0430a_base
{-# NOINLINE releaseCounter #-}
{-| __C declaration:__ @releaseCounter@
__defined at:__ @edge-cases\/iterator.h 13:6@
__exported by:__ @edge-cases\/iterator.h@
-}
releaseCounter :: BG.FunPtr (Counter -> IO ())
releaseCounter =
BG.unsafePerformIO hs_bindgen_849de94baad0430a
-- __unique:__ @test_edgecasesiterator_Example_get_makeVarCounter@
foreign import ccall unsafe "hs_bindgen_8eea20d99febeef3" hs_bindgen_8eea20d99febeef3_base ::
IO (BG.FunPtr BG.Void)
-- __unique:__ @test_edgecasesiterator_Example_get_makeVarCounter@
hs_bindgen_8eea20d99febeef3 :: IO (BG.FunPtr (BG.CInt -> IO VarCounter))
hs_bindgen_8eea20d99febeef3 =
fmap BG.fromFFIType hs_bindgen_8eea20d99febeef3_base
{-# NOINLINE makeVarCounter #-}
{-| __C declaration:__ @makeVarCounter@
__defined at:__ @edge-cases\/iterator.h 18:12@
__exported by:__ @edge-cases\/iterator.h@
-}
makeVarCounter :: BG.FunPtr (BG.CInt -> IO VarCounter)
makeVarCounter =
BG.unsafePerformIO hs_bindgen_8eea20d99febeef3
-- __unique:__ @test_edgecasesiterator_Example_get_varCounterNext@
foreign import ccall unsafe "hs_bindgen_3ae982266c863a3d" hs_bindgen_3ae982266c863a3d_base ::
IO (BG.FunPtr BG.Void)
-- __unique:__ @test_edgecasesiterator_Example_get_varCounterNext@
hs_bindgen_3ae982266c863a3d :: IO (BG.FunPtr (VarCounter -> BG.CInt -> IO BG.CInt))
hs_bindgen_3ae982266c863a3d =
fmap BG.fromFFIType hs_bindgen_3ae982266c863a3d_base
{-# NOINLINE varCounterNext #-}
{-| __C declaration:__ @varCounterNext@
__defined at:__ @edge-cases\/iterator.h 19:5@
__exported by:__ @edge-cases\/iterator.h@
-}
varCounterNext :: BG.FunPtr (VarCounter -> BG.CInt -> IO BG.CInt)
varCounterNext =
BG.unsafePerformIO hs_bindgen_3ae982266c863a3d
-- __unique:__ @test_edgecasesiterator_Example_get_releaseVarCounter@
foreign import ccall unsafe "hs_bindgen_802a723805cb041f" hs_bindgen_802a723805cb041f_base ::
IO (BG.FunPtr BG.Void)
-- __unique:__ @test_edgecasesiterator_Example_get_releaseVarCounter@
hs_bindgen_802a723805cb041f :: IO (BG.FunPtr (VarCounter -> IO ()))
hs_bindgen_802a723805cb041f =
fmap BG.fromFFIType hs_bindgen_802a723805cb041f_base
{-# NOINLINE releaseVarCounter #-}
{-| __C declaration:__ @releaseVarCounter@
__defined at:__ @edge-cases\/iterator.h 20:6@
__exported by:__ @edge-cases\/iterator.h@
-}
releaseVarCounter :: BG.FunPtr (VarCounter -> IO ())
releaseVarCounter =
BG.unsafePerformIO hs_bindgen_802a723805cb041f