ormolu/data/examples/declaration/foreign/foreign-export.hs
2019-06-19 21:20:19 +02:00

9 lines
310 B
Haskell

foreign export ccall foo :: Int -> IO Int
-- | 'foreignTomFun' is a very important thing
foreign export ccall "tomography" foreignTomFun
:: StablePtr Storage {- Storage is bad -} -> TomForegin
foreign export {- We can't use capi here -} ccall "dynamic"
export_nullaryMeth :: (IO HRESULT) -> IO (Ptr ())