ec6622f0c2743412ee9f0a1aa640a013ff9e4cd7
[clean-tests.git] / gengen / Data / GenType / CType.dcl
1 definition module Data.GenType.CType
2
3 from StdGeneric import :: GenericTypeDefDescriptor
4 from Data.Either import :: Either
5 from Data.GenType import :: Type
6
7 /**
8 * generate typedefs for the types grouped by strongly connected components
9 */
10 typedefs :: [[Type]] -> Either String [String]
11
12 /**
13 * Generate a single typedef for a type.
14 * This does not terminate for recursive types
15 */
16 flatTypedef :: Type -> Either String [String]
17
18 /**
19 * Create a C-safe type name
20 */
21 safe :: String -> String
22
23 /**
24 * Return the C type prefix, e.g. struct, enum
25 */
26 prefix :: Type -> String
27
28 /**
29 * Return the C constructorname
30 */
31 consName :: GenericTypeDefDescriptor -> String