packages feed

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

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

module Example.Safe
    ( Example.Safe.foo
    , Example.Safe.bar
    , Example.Safe.baz
    )
  where

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

$(HsBindgen.Runtime.Support.CAPI.addCSource (HsBindgen.Runtime.Support.CAPI.unlines
  [ "#include <macros/reparse/functions.h>"
  , "void hs_bindgen_9b92d478f1b3a709 ("
  , "  signed int arg1"
  , ")"
  , "{"
  , "  (foo)(arg1);"
  , "}"
  , "signed int hs_bindgen_27c1a1b289182157 ("
  , "  signed int arg1"
  , ")"
  , "{"
  , "  return (bar)(arg1);"
  , "}"
  , "signed int hs_bindgen_36638004661f2e8f ("
  , "  signed int arg1"
  , ")"
  , "{"
  , "  return (baz)(arg1);"
  , "}"
  ]))

-- __unique:__ @test_macrosreparsefunctions_1_emp_Example_Safe_foo@
foreign import ccall safe "hs_bindgen_9b92d478f1b3a709" hs_bindgen_9b92d478f1b3a709_base ::
     BG.CInt
  -> IO ()

-- __unique:__ @test_macrosreparsefunctions_1_emp_Example_Safe_foo@
hs_bindgen_9b92d478f1b3a709 ::
     BG.CInt
  -> IO ()
hs_bindgen_9b92d478f1b3a709 =
  \x0 ->
    hs_bindgen_9b92d478f1b3a709_base (BG.toFFIType x0)

{-| __C declaration:__ @foo@

    __defined at:__ @macros\/reparse\/functions.h 7:6@

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

-- __unique:__ @test_macrosreparsefunctions_1_emp_Example_Safe_bar@
foreign import ccall safe "hs_bindgen_27c1a1b289182157" hs_bindgen_27c1a1b289182157_base ::
     BG.CInt
  -> IO BG.CInt

-- __unique:__ @test_macrosreparsefunctions_1_emp_Example_Safe_bar@
hs_bindgen_27c1a1b289182157 ::
     BG.CInt
  -> IO BG.CInt
hs_bindgen_27c1a1b289182157 =
  \x0 ->
    fmap BG.fromFFIType (hs_bindgen_27c1a1b289182157_base (BG.toFFIType x0))

{-| __C declaration:__ @bar@

    __defined at:__ @macros\/reparse\/functions.h 9:19@

    __exported by:__ @macros\/reparse\/functions.h@
-}
bar ::
     BG.CInt
     -- ^ __C declaration:__ @x@
  -> IO BG.CInt
bar = hs_bindgen_27c1a1b289182157

-- __unique:__ @test_macrosreparsefunctions_1_emp_Example_Safe_baz@
foreign import ccall safe "hs_bindgen_36638004661f2e8f" hs_bindgen_36638004661f2e8f_base ::
     BG.CInt
  -> IO BG.CInt

-- __unique:__ @test_macrosreparsefunctions_1_emp_Example_Safe_baz@
hs_bindgen_36638004661f2e8f ::
     BG.CInt
  -> IO BG.CInt
hs_bindgen_36638004661f2e8f =
  \x0 ->
    fmap BG.fromFFIType (hs_bindgen_36638004661f2e8f_base (BG.toFFIType x0))

{-| __C declaration:__ @baz@

    __defined at:__ @macros\/reparse\/functions.h 14:12@

    __exported by:__ @macros\/reparse\/functions.h@
-}
baz ::
     BG.CInt
     -- ^ __C declaration:__ @x@
  -> IO BG.CInt
baz = hs_bindgen_36638004661f2e8f