packages feed

hs-bindgen-1.0.0.0: test-artefacts/fixtures/binding-specs/fun_arg/macro/union/Example/Safe.hs

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

module Example.Safe
    ( Example.Safe.foo
    , Example.Safe.fooA
    , Example.Safe.fooB
    , Example.Safe.fooC
    , Example.Safe.fooD
    , Example.Safe.fooE
    )
  where

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

$(HsBindgen.Runtime.Support.CAPI.addCSource (HsBindgen.Runtime.Support.CAPI.unlines
  [ "#include <binding-specs/fun_arg/macro/union.h>"
  , "void hs_bindgen_5da9ad143faecbca ("
  , "  union MyUnion *arg1"
  , ")"
  , "{"
  , "  (foo)(*arg1);"
  , "}"
  , "void hs_bindgen_f70ba8b74da026b3 ("
  , "  A *arg1"
  , ")"
  , "{"
  , "  (fooA)(*arg1);"
  , "}"
  , "void hs_bindgen_89e946b10b5189a6 ("
  , "  B *arg1"
  , ")"
  , "{"
  , "  (fooB)(*arg1);"
  , "}"
  , "void hs_bindgen_c82bf4a34bf547de ("
  , "  C *arg1"
  , ")"
  , "{"
  , "  (fooC)(*arg1);"
  , "}"
  , "void hs_bindgen_25033ba8f1b4731d ("
  , "  D *arg1"
  , ")"
  , "{"
  , "  (fooD)(*arg1);"
  , "}"
  , "void hs_bindgen_0cf5debdefedd88c ("
  , "  E *arg1"
  , ")"
  , "{"
  , "  (fooE)(*arg1);"
  , "}"
  ]))

-- __unique:__ @test_bindingspecsfun_argmacroun_Example_Safe_foo@
foreign import ccall safe "hs_bindgen_5da9ad143faecbca" hs_bindgen_5da9ad143faecbca_base ::
     BG.Ptr BG.Void
  -> IO ()

-- __unique:__ @test_bindingspecsfun_argmacroun_Example_Safe_foo@
hs_bindgen_5da9ad143faecbca ::
     BG.Ptr MyUnion
  -> IO ()
hs_bindgen_5da9ad143faecbca =
  \x0 ->
    hs_bindgen_5da9ad143faecbca_base (BG.toFFIType x0)

{-| __C declaration:__ @foo@

    __defined at:__ @binding-specs\/fun_arg\/macro\/union.h 6:6@

    __exported by:__ @binding-specs\/fun_arg\/macro\/union.h@
-}
foo ::
     MyUnion
     -- ^ __C declaration:__ @x@
  -> IO ()
foo =
  \x0 ->
    BG.with x0 (\x1 -> hs_bindgen_5da9ad143faecbca x1)

-- __unique:__ @test_bindingspecsfun_argmacroun_Example_Safe_fooA@
foreign import ccall safe "hs_bindgen_f70ba8b74da026b3" hs_bindgen_f70ba8b74da026b3_base ::
     BG.Ptr BG.Void
  -> IO ()

-- __unique:__ @test_bindingspecsfun_argmacroun_Example_Safe_fooA@
hs_bindgen_f70ba8b74da026b3 ::
     BG.Ptr A
  -> IO ()
hs_bindgen_f70ba8b74da026b3 =
  \x0 ->
    hs_bindgen_f70ba8b74da026b3_base (BG.toFFIType x0)

{-| __C declaration:__ @fooA@

    __defined at:__ @binding-specs\/fun_arg\/macro\/union.h 12:6@

    __exported by:__ @binding-specs\/fun_arg\/macro\/union.h@
-}
fooA ::
     A
     -- ^ __C declaration:__ @x@
  -> IO ()
fooA =
  \x0 ->
    BG.with x0 (\x1 -> hs_bindgen_f70ba8b74da026b3 x1)

-- __unique:__ @test_bindingspecsfun_argmacroun_Example_Safe_fooB@
foreign import ccall safe "hs_bindgen_89e946b10b5189a6" hs_bindgen_89e946b10b5189a6_base ::
     BG.Ptr BG.Void
  -> IO ()

-- __unique:__ @test_bindingspecsfun_argmacroun_Example_Safe_fooB@
hs_bindgen_89e946b10b5189a6 ::
     BG.Ptr B
  -> IO ()
hs_bindgen_89e946b10b5189a6 =
  \x0 ->
    hs_bindgen_89e946b10b5189a6_base (BG.toFFIType x0)

{-| __C declaration:__ @fooB@

    __defined at:__ @binding-specs\/fun_arg\/macro\/union.h 13:6@

    __exported by:__ @binding-specs\/fun_arg\/macro\/union.h@
-}
fooB ::
     B
     -- ^ __C declaration:__ @x@
  -> IO ()
fooB =
  \x0 ->
    BG.with x0 (\x1 -> hs_bindgen_89e946b10b5189a6 x1)

-- __unique:__ @test_bindingspecsfun_argmacroun_Example_Safe_fooC@
foreign import ccall safe "hs_bindgen_c82bf4a34bf547de" hs_bindgen_c82bf4a34bf547de_base ::
     BG.Ptr BG.Void
  -> IO ()

-- __unique:__ @test_bindingspecsfun_argmacroun_Example_Safe_fooC@
hs_bindgen_c82bf4a34bf547de ::
     BG.Ptr M.C
  -> IO ()
hs_bindgen_c82bf4a34bf547de =
  \x0 ->
    hs_bindgen_c82bf4a34bf547de_base (BG.toFFIType x0)

{-| __C declaration:__ @fooC@

    __defined at:__ @binding-specs\/fun_arg\/macro\/union.h 33:6@

    __exported by:__ @binding-specs\/fun_arg\/macro\/union.h@
-}
fooC ::
     M.C
     -- ^ __C declaration:__ @x@
  -> IO ()
fooC =
  \x0 ->
    BG.with x0 (\x1 -> hs_bindgen_c82bf4a34bf547de x1)

-- __unique:__ @test_bindingspecsfun_argmacroun_Example_Safe_fooD@
foreign import ccall safe "hs_bindgen_25033ba8f1b4731d" hs_bindgen_25033ba8f1b4731d_base ::
     BG.Ptr BG.Void
  -> IO ()

-- __unique:__ @test_bindingspecsfun_argmacroun_Example_Safe_fooD@
hs_bindgen_25033ba8f1b4731d ::
     BG.Ptr M.D
  -> IO ()
hs_bindgen_25033ba8f1b4731d =
  \x0 ->
    hs_bindgen_25033ba8f1b4731d_base (BG.toFFIType x0)

{-| __C declaration:__ @fooD@

    __defined at:__ @binding-specs\/fun_arg\/macro\/union.h 34:6@

    __exported by:__ @binding-specs\/fun_arg\/macro\/union.h@
-}
fooD ::
     M.D
     -- ^ __C declaration:__ @x@
  -> IO ()
fooD =
  \x0 ->
    BG.with x0 (\x1 -> hs_bindgen_25033ba8f1b4731d x1)

-- __unique:__ @test_bindingspecsfun_argmacroun_Example_Safe_fooE@
foreign import ccall safe "hs_bindgen_0cf5debdefedd88c" hs_bindgen_0cf5debdefedd88c_base ::
     BG.Ptr BG.Void
  -> IO ()

-- __unique:__ @test_bindingspecsfun_argmacroun_Example_Safe_fooE@
hs_bindgen_0cf5debdefedd88c ::
     BG.Ptr E
  -> IO ()
hs_bindgen_0cf5debdefedd88c =
  \x0 ->
    hs_bindgen_0cf5debdefedd88c_base (BG.toFFIType x0)

{-| __C declaration:__ @fooE@

    __defined at:__ @binding-specs\/fun_arg\/macro\/union.h 35:6@

    __exported by:__ @binding-specs\/fun_arg\/macro\/union.h@
-}
fooE ::
     E
     -- ^ __C declaration:__ @x@
  -> IO ()
fooE =
  \x0 ->
    BG.with x0 (\x1 -> hs_bindgen_0cf5debdefedd88c x1)