packages feed

hs-bindgen-1.0.0.0: test-artefacts/fixtures/functions/hash_defines.1.select_all/Example/Unsafe.hs

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

module Example.Unsafe
    ( Example.Unsafe.hash_defines_feature
    , Example.Unsafe.hash_defines_empty
    )
  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
  [ "#define MY_FEATURE 1"
  , "#define MY_SIZE 8"
  , "#define MY_EMPTY"
  , "#include <functions/hash_defines.h>"
  , "signed int hs_bindgen_9c64b65744839a8b ("
  , "  signed int arg1"
  , ")"
  , "{"
  , "  return (hash_defines_feature)(arg1);"
  , "}"
  , "signed int hs_bindgen_f811fa46f514d285 (void)"
  , "{"
  , "  return (hash_defines_empty)();"
  , "}"
  ]))

-- __unique:__ @test_functionshash_defines_1_selec_Example_Unsafe_hash_defines_feature@
foreign import ccall unsafe "hs_bindgen_9c64b65744839a8b" hs_bindgen_9c64b65744839a8b_base ::
     BG.CInt
  -> IO BG.CInt

-- __unique:__ @test_functionshash_defines_1_selec_Example_Unsafe_hash_defines_feature@
hs_bindgen_9c64b65744839a8b ::
     BG.CInt
  -> IO BG.CInt
hs_bindgen_9c64b65744839a8b =
  \x0 ->
    fmap BG.fromFFIType (hs_bindgen_9c64b65744839a8b_base (BG.toFFIType x0))

{-| __C declaration:__ @hash_defines_feature@

    __defined at:__ @functions\/hash_defines.h 9:5@

    __exported by:__ @functions\/hash_defines.h@
-}
hash_defines_feature ::
     BG.CInt
     -- ^ __C declaration:__ @x@
  -> IO BG.CInt
hash_defines_feature = hs_bindgen_9c64b65744839a8b

-- __unique:__ @test_functionshash_defines_1_selec_Example_Unsafe_hash_defines_empty@
foreign import ccall unsafe "hs_bindgen_f811fa46f514d285" hs_bindgen_f811fa46f514d285_base ::
     IO BG.CInt

-- __unique:__ @test_functionshash_defines_1_selec_Example_Unsafe_hash_defines_empty@
hs_bindgen_f811fa46f514d285 :: IO BG.CInt
hs_bindgen_f811fa46f514d285 =
  fmap BG.fromFFIType hs_bindgen_f811fa46f514d285_base

{-| __C declaration:__ @hash_defines_empty@

    __defined at:__ @functions\/hash_defines.h 20:5@

    __exported by:__ @functions\/hash_defines.h@
-}
hash_defines_empty :: IO BG.CInt
hash_defines_empty = hs_bindgen_f811fa46f514d285