Popularity
1.2
Declining
Activity
0.0
Declining
1
2
0
Monthly Downloads: 17
Programming language: Haskell
License: Mozilla Public License 2.0
Tags:
Foreign
Latest version: v0.2.0.0
marshal-contt alternatives and similar packages
Based on the "Foreign" category.
Alternatively, view marshal-contt alternatives based on common mentions on social networks and blogs.
-
tasty-lua
DISCONTINUED. Integrate Lua tests into tasty. This package is now part of the hslua monorepo. -
hslua-module-text
DISCONTINUED. Lua module providing a selected set of operations on Text. NOTE: moved into the hslua monorepo. -
hslua-module-system
DISCONTINUED. HsLua module for system and directory functions. This repository has been moved to the hslua monorepo. -
foreign-storable-asymmetric
DISCONTINUED. Types and instances for implementing a Storable with different peek and poke
WorkOS - The modern identity platform for B2B SaaS
The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Promo
workos.com
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of marshal-contt or a related project?
Popular Comparisons
README
marshal-contt
A ContT-based wrapper for the bracket-style Haskell-to-C marshalling functions in base
and bytestring
.
Example:
type Argv = [BS.ByteString]
type Env = M.Map BS.ByteString BS.ByteString
allocStringArrayWith :: [BS.ByteString] -> ContT r IO (Ptr CString)
allocStringArrayWith = allocaArrayWith0' withCString
allocStringMapWith :: M.Map BS.ByteString BS.ByteString -> (Ptr CString -> IO a) -> IO a
allocStringMapWith = iallocaArrayWith0' (\(k, v) -> withCString $ k <> "=" <> v)
spawn :: FilePath -> [FileActions] -> Argv -> Env -> IO ProcessID
spawn path actions argv env = flip runContT return $ do
cPath <- withCString path
cAction <- withFileActions actions
cArgv <- allocStringArrayWith argv
cEnv <- marshalEnv env
pidPtr <- alloca
liftIO . throwErrnoIf_ (/= 0) path $
posix_spawn pidPtr cPath cActions nullSpawnAttrs cArgv cEnv
liftIO $ peek pidPtr
spawnp :: String -> [FileActions] -> Argv -> Env -> IO ProcessID
spawnp command actions argv env = flip runContT return $ do
cPath <- withCString path
cAction <- withFileActions actions
cArgv <- allocStringArrayWith argv
cEnv <- marshalEnv env
pidPtr <- alloca
liftIO . throwErrnoIf_ (/= 0) path $
posix_spawnp pidPtr cPath cActions nullSpawnAttrs cArgv cEnv
liftIO $ peek pidPtr