Skip to content

Commit

Permalink
Demonstrate need to import something from c-expr
Browse files Browse the repository at this point in the history
  • Loading branch information
phadej authored and edsko committed Feb 5, 2025
1 parent fcf4b4b commit 3387ae8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hs-bindgen/test-th/HsBindgen/TestTH/Spliced.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import HsBindgen.Lib
import Misc
import System.FilePath ((</>))
import Foreign
import Foreign.C.Types

$(runIO (findPackageDirectory "hs-bindgen") >>= \dir -> templateHaskell (Just dir) (dir </> "examples" </> "test-th-01.h"))

Expand All @@ -21,3 +22,6 @@ val = MyStruct

pokeVal :: Ptr MyStruct -> IO ()
pokeVal ptr = poke ptr val

myPlus :: CLong -> CLong -> CLong
myPlus x y = pLUS x y

0 comments on commit 3387ae8

Please sign in to comment.