packages feed

hs-bindgen-1.0.0.0: test-artefacts/fixtures/binding-specs/relative_include/sub/consumer/Example/FunPtr.hs

{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_HADDOCK prune #-}

module Example.FunPtr
    ( Example.FunPtr.use_widget
    )
  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 <binding-specs/relative_include/sub/consumer.h>"
  , "/* test_bindingspecsrelative_include_Example_get_use_widget */"
  , "__attribute__ ((const))"
  , "void (*hs_bindgen_33ccb2801b32fc12 (void)) ("
  , "  widget_legacy_t *arg1"
  , ")"
  , "{"
  , "  return &use_widget;"
  , "}"
  ]))

-- __unique:__ @test_bindingspecsrelative_include_Example_get_use_widget@
foreign import ccall unsafe "hs_bindgen_33ccb2801b32fc12" hs_bindgen_33ccb2801b32fc12_base ::
     IO (BG.FunPtr BG.Void)

-- __unique:__ @test_bindingspecsrelative_include_Example_get_use_widget@
hs_bindgen_33ccb2801b32fc12 :: IO (BG.FunPtr (BG.Ptr Widget_legacy_t -> IO ()))
hs_bindgen_33ccb2801b32fc12 =
  fmap BG.fromFFIType hs_bindgen_33ccb2801b32fc12_base

{-# NOINLINE use_widget #-}
{-| __C declaration:__ @use_widget@

    __defined at:__ @binding-specs\/relative_include\/sub\/consumer.h 21:6@

    __exported by:__ @binding-specs\/relative_include\/sub\/consumer.h@
-}
use_widget :: BG.FunPtr (BG.Ptr Widget_legacy_t -> IO ())
use_widget =
  BG.unsafePerformIO hs_bindgen_33ccb2801b32fc12