mangle: Convert C++ type signatures to their mangled form

[ bsd3, ffi, library, program ] [ Propose Tags ] [ Report a vulnerability ]

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 ()
  |])

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.1
Change log CHANGELOG.md
Dependencies base (>=4.11.1.0 && <4.20), containers (>=0.5.11.0 && <0.7), parsec (>=3.1.13.0 && <3.2), template-haskell (>=2.13 && <2.22) [details]
License BSD-3-Clause
Copyright (c) Facebook, All Rights Reserved
Author Facebook, Inc.
Maintainer hsthrift-team@fb.com
Category FFI
Home page https://github.com/facebookincubator/hsthrift
Bug tracker https://github.com/facebookincubator/hsthrift/issues
Source repo head: git clone https://github.com/facebookincubator/hsthrift.git
Uploaded by SimonMarlow at 2025-04-23T10:10:09Z
Distributions
Executables mangle
Downloads 0 total (0 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2025-04-23 [all 1 reports]