packages feed

hs-bindgen-1.0.0.0: test-artefacts/fixtures/functions/fun_attributes_conflict/Example/Unsafe.hs

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

module Example.Unsafe
    ( Example.Unsafe.square_cp
    , Example.Unsafe.square_pc
    , Example.Unsafe.square_cc
    , Example.Unsafe.square_pp
    )
  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 <functions/fun_attributes_conflict.h>"
  , "signed int hs_bindgen_648d4f0fd0df4c79 ("
  , "  signed int arg1"
  , ")"
  , "{"
  , "  return (square_cp)(arg1);"
  , "}"
  , "signed int hs_bindgen_632a1e6eb5ceeda7 ("
  , "  signed int arg1"
  , ")"
  , "{"
  , "  return (square_pc)(arg1);"
  , "}"
  , "signed int hs_bindgen_56d75b1ff2482f13 ("
  , "  signed int arg1"
  , ")"
  , "{"
  , "  return (square_cc)(arg1);"
  , "}"
  , "signed int hs_bindgen_eac2f9645ef29119 ("
  , "  signed int arg1"
  , ")"
  , "{"
  , "  return (square_pp)(arg1);"
  , "}"
  ]))

-- __unique:__ @test_functionsfun_attributes_confl_Example_Unsafe_square_cp@
foreign import ccall unsafe "hs_bindgen_648d4f0fd0df4c79" hs_bindgen_648d4f0fd0df4c79_base ::
     BG.CInt
  -> BG.CInt

-- __unique:__ @test_functionsfun_attributes_confl_Example_Unsafe_square_cp@
hs_bindgen_648d4f0fd0df4c79 ::
     BG.CInt
  -> BG.CInt
hs_bindgen_648d4f0fd0df4c79 =
  \x0 ->
    BG.fromFFIType (hs_bindgen_648d4f0fd0df4c79_base (BG.toFFIType x0))

{-|

    Marked @__attribute((const))__@

    __C declaration:__ @square_cp@

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

    __exported by:__ @functions\/fun_attributes_conflict.h@
-}
square_cp ::
     BG.CInt
     -- ^ __C declaration:__ @x@
  -> BG.CInt
square_cp = hs_bindgen_648d4f0fd0df4c79

-- __unique:__ @test_functionsfun_attributes_confl_Example_Unsafe_square_pc@
foreign import ccall unsafe "hs_bindgen_632a1e6eb5ceeda7" hs_bindgen_632a1e6eb5ceeda7_base ::
     BG.CInt
  -> BG.CInt

-- __unique:__ @test_functionsfun_attributes_confl_Example_Unsafe_square_pc@
hs_bindgen_632a1e6eb5ceeda7 ::
     BG.CInt
  -> BG.CInt
hs_bindgen_632a1e6eb5ceeda7 =
  \x0 ->
    BG.fromFFIType (hs_bindgen_632a1e6eb5ceeda7_base (BG.toFFIType x0))

{-|

    Marked @__attribute((const))__@

    __C declaration:__ @square_pc@

    __defined at:__ @functions\/fun_attributes_conflict.h 11:5@

    __exported by:__ @functions\/fun_attributes_conflict.h@
-}
square_pc ::
     BG.CInt
     -- ^ __C declaration:__ @x@
  -> BG.CInt
square_pc = hs_bindgen_632a1e6eb5ceeda7

-- __unique:__ @test_functionsfun_attributes_confl_Example_Unsafe_square_cc@
foreign import ccall unsafe "hs_bindgen_56d75b1ff2482f13" hs_bindgen_56d75b1ff2482f13_base ::
     BG.CInt
  -> BG.CInt

-- __unique:__ @test_functionsfun_attributes_confl_Example_Unsafe_square_cc@
hs_bindgen_56d75b1ff2482f13 ::
     BG.CInt
  -> BG.CInt
hs_bindgen_56d75b1ff2482f13 =
  \x0 ->
    BG.fromFFIType (hs_bindgen_56d75b1ff2482f13_base (BG.toFFIType x0))

{-|

    Marked @__attribute((const))__@

    __C declaration:__ @square_cc@

    __defined at:__ @functions\/fun_attributes_conflict.h 13:5@

    __exported by:__ @functions\/fun_attributes_conflict.h@
-}
square_cc ::
     BG.CInt
     -- ^ __C declaration:__ @x@
  -> BG.CInt
square_cc = hs_bindgen_56d75b1ff2482f13

-- __unique:__ @test_functionsfun_attributes_confl_Example_Unsafe_square_pp@
foreign import ccall unsafe "hs_bindgen_eac2f9645ef29119" hs_bindgen_eac2f9645ef29119_base ::
     BG.CInt
  -> IO BG.CInt

-- __unique:__ @test_functionsfun_attributes_confl_Example_Unsafe_square_pp@
hs_bindgen_eac2f9645ef29119 ::
     BG.CInt
  -> IO BG.CInt
hs_bindgen_eac2f9645ef29119 =
  \x0 ->
    fmap BG.fromFFIType (hs_bindgen_eac2f9645ef29119_base (BG.toFFIType x0))

{-|

    Marked @__attribute((pure))__@

    __C declaration:__ @square_pp@

    __defined at:__ @functions\/fun_attributes_conflict.h 15:5@

    __exported by:__ @functions\/fun_attributes_conflict.h@
-}
square_pp ::
     BG.CInt
     -- ^ __C declaration:__ @x@
  -> IO BG.CInt
square_pp = hs_bindgen_eac2f9645ef29119