cppfilt-0.1.0.0: Bindings for C++ demangling routines

Data.CStringRepresentable

Description

This module provides the type class (and a few implementations) for values that can be efficiently converted to/from CString. Instances for String and strict ByteString are provided, and the use of ByteString is recommended if performance is a concern.

Synopsis

Documentation

class CStringRepresentable a where Source #

Represents values that can be efficiently converted to and from CStrings.

Minimal complete definition

Methods

toCString :: a -> (CString -> IO b) -> IO b Source #

Perform a function on the CString representation of the value.

Convert CString to a value of the type. The ownership is not transferred.

Instances

 Source # Strings can be represented as CStrings (albeit conversions are inefficient). MethodstoCString :: String -> (CString -> IO b) -> IO b Source # Source # ByteStrings can be represented as CStrings. MethodstoCString :: ByteString -> (CString -> IO b) -> IO b Source #