Safe Haskell | None |
---|---|
Language | Haskell98 |
- convert :: Text -> BaseCodeGen e Converter -> BaseCodeGen e Text
- genConversion :: Text -> Converter -> CodeGen Text
- unpackCArray :: Text -> Type -> Transfer -> ExcCodeGen Converter
- computeArrayLength :: Text -> Type -> ExcCodeGen Text
- hToF :: Type -> Transfer -> ExcCodeGen Converter
- fToH :: Type -> Transfer -> ExcCodeGen Converter
- haskellType :: Type -> CodeGen TypeRep
- foreignType :: Type -> CodeGen TypeRep
- argumentType :: [Char] -> Type -> CodeGen ([Char], Text, [Text])
- elementType :: Type -> Maybe Type
- elementMap :: Type -> Text -> Maybe Text
- elementTypeAndMap :: Type -> Text -> Maybe (Type, Text)
- isManaged :: Type -> CodeGen Bool
- typeIsNullable :: Type -> CodeGen Bool
- typeIsPtr :: Type -> CodeGen Bool
- getIsScalar :: Type -> CodeGen Bool
- requiresAlloc :: Type -> CodeGen (Maybe (Bool, Int))
- apply :: Constructor -> Converter
- mapC :: Constructor -> Converter
- literal :: Constructor -> Converter
- data Constructor
Documentation
convert :: Text -> BaseCodeGen e Converter -> BaseCodeGen e Text Source
genConversion :: Text -> Converter -> CodeGen Text Source
unpackCArray :: Text -> Type -> Transfer -> ExcCodeGen Converter Source
computeArrayLength :: Text -> Type -> ExcCodeGen Text Source
hToF :: Type -> Transfer -> ExcCodeGen Converter Source
fToH :: Type -> Transfer -> ExcCodeGen Converter Source
haskellType :: Type -> CodeGen TypeRep Source
foreignType :: Type -> CodeGen TypeRep Source
elementType :: Type -> Maybe Type 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.
getIsScalar :: Type -> CodeGen Bool Source
apply :: Constructor -> Converter Source
mapC :: Constructor -> Converter Source
literal :: Constructor -> Converter Source