haskell-gi-0.14: Generate Haskell bindings for GObject Introspection capable libraries

Safe HaskellNone
LanguageHaskell98

Data.GI.CodeGen.Conversions

Synopsis

Documentation

convert :: Text -> BaseCodeGen e Converter -> BaseCodeGen e Text Source

genConversion :: Text -> Converter -> CodeGen Text Source

unpackCArray :: Text -> Type -> Transfer -> ExcCodeGen Converter Source

hToF :: Type -> Transfer -> ExcCodeGen Converter Source

fToH :: Type -> Transfer -> ExcCodeGen Converter Source

argumentType :: [Char] -> Type -> CodeGen ([Char], Text, [Text]) Source

elementMap :: Type -> Text -> Maybe Text Source

elementTypeAndMap :: Type -> Text -> Maybe (Type, Text) Source

typeIsNullable :: Type -> CodeGen Bool Source

Returns whether the given type should be represented by a Maybe type on the Haskell side. This applies to all properties which have a C representation in terms of pointers, except for G(S)Lists, for which NULL is a valid G(S)List, and raw pointers, which we just pass through to the Haskell side. Notice that introspection annotations can override this.

typeIsPtr :: Type -> CodeGen Bool Source

Returns whether the given type is represented by a pointer on the C side.

apply :: Constructor -> Converter Source

mapC :: Constructor -> Converter Source

literal :: Constructor -> Converter Source

data Constructor Source

Constructors

P Text 
M Text 
Id