packages feed

hs-bindgen-1.0.0.0: test-artefacts/fixtures/macros/undef.1.empty/Example/Safe.hs

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

module Example.Safe
    ( Example.Safe.foo
    )
  where

import qualified HsBindgen.Runtime.Support as BG
import qualified HsBindgen.Runtime.Support.CAPI
import Prelude (IO)

$(HsBindgen.Runtime.Support.CAPI.addCSource (HsBindgen.Runtime.Support.CAPI.unlines
  [ "#include <macros/undef.h>"
  , "void hs_bindgen_9537cfc61fc6a78a ("
  , "  signed int arg1"
  , ")"
  , "{"
  , "  (foo)(arg1);"
  , "}"
  ]))

-- __unique:__ @test_macrosundef_1_empty_Example_Safe_foo@
foreign import ccall safe "hs_bindgen_9537cfc61fc6a78a" hs_bindgen_9537cfc61fc6a78a_base ::
     BG.CInt
  -> IO ()

-- __unique:__ @test_macrosundef_1_empty_Example_Safe_foo@
hs_bindgen_9537cfc61fc6a78a ::
     BG.CInt
  -> IO ()
hs_bindgen_9537cfc61fc6a78a =
  \x0 ->
    hs_bindgen_9537cfc61fc6a78a_base (BG.toFFIType x0)

{-| __C declaration:__ @foo@

    __defined at:__ @macros\/undef.h 4:6@

    __exported by:__ @macros\/undef.h@
-}
foo ::
     BG.CInt
     -- ^ __C declaration:__ @x@
  -> IO ()
foo = hs_bindgen_9537cfc61fc6a78a