{-# LANGUAGE CPP #-} {-# LANGUAGE ForeignFunctionInterface #-} {-# LANGUAGE OverloadedStrings #-} module Hsm.Cam.Lib ( someCWrapper ) where import Control.Monad ((>=>)) import Data.Text (pack) import Foreign.C.String (CString, peekCString) import Hsm.Log qualified as L foreign export ccall logMsg :: CString -> IO () logMsg :: CString -> IO () logMsg = peekCString >=> L.logMsg ["cam", "lib"] . pack foreign import ccall safe "Test.h some_c_wrapper" someCWrapper :: IO ()