@hackage mangle0.1.0.1
Convert C++ type signatures to their mangled form
Categories
License
BSD-3-Clause
Maintainer
hsthrift-team@fb.com
Links
Versions
- 0.1.0.1 Wed, 23 Apr 2025
Installation
Dependencies (4)
- base >=4.11.1.0 && <4.20
- containers >=0.5.11.0 && <0.7
- parsec ^>=3.1.13.0
- template-haskell >=2.13 && <2.22 Show all…
Dependents (2)
@hackage/fb-util, @hackage/glean
Converts C++ type signatures to mangled symbol names.
This is useful for calling C++ functions via the FFI without using
extern "C" { .. }.
The library can be used with Template Haskell, so you can call C++ code directly from Haskell, e.g.
{-# LANGUAGE TemplateHaskell #-}
...
import Mangle.TH
...
$(mangle
"void glog_info(const char*, int, const char*)"
[d|
foreign import ccall
c_glog_info :: CString -> CInt -> CString -> IO ()
|])