-- | generate exposed module list in cabal file 
genExposedModules :: String -> [ClassModule] -> String
genExposedModules summarymod cmods = 
    let indentspace = cabalIndentation
        summarystrs = indentspace ++ summarymod 
        cmodstrs = map ((\x->indentspace++x).cmModule) cmods 
        rawType = map ((\x->indentspace++x++".RawType").cmModule) cmods
        ffi = map ((\x->indentspace++x++".FFI").cmModule) cmods
        interface= map ((\x->indentspace++x++".Interface").cmModule) cmods
        cast = map ((\x->indentspace++x++".Cast").cmModule) cmods 
        implementation = map ((\x->indentspace++x++".Implementation").cmModule) cmods
    in  unlines ([summarystrs]++cmodstrs++rawType++ffi++interface++cast++implementation)
genExposedModules :: String -> [ClassModule] -> String
genExposedModules summarymod cmods = 
    let indentspace = cabalIndentation
        summarystrs = indentspace ++ summarymod 
        cmodstrs = map ((\x->indentspace++x).cmModule) cmods 
        rawType = map ((\x->indentspace++x++".RawType").cmModule) cmods
        ffi = map ((\x->indentspace++x++".FFI").cmModule) cmods
        interface= map ((\x->indentspace++x++".Interface").cmModule) cmods
        cast = map ((\x->indentspace++x++".Cast").cmModule) cmods 
        implementation = map ((\x->indentspace++x++".Implementation").cmModule) cmods
    in  unlines ([summarystrs]++cmodstrs++rawType++ffi++interface++cast++implementation)
genExposedModules summarymod cmods = 
    let indentspace = cabalIndentation
        summarystrs = indentspace ++ summarymod 
        cmodstrs = map ((\x->indentspace++x).cmModule) cmods 
        rawType = map ((\x->indentspace++x++".RawType").cmModule) cmods
        ffi = map ((\x->indentspace++x++".FFI").cmModule) cmods
        interface= map ((\x->indentspace++x++".Interface").cmModule) cmods
        cast = map ((\x->indentspace++x++".Cast").cmModule) cmods 
        implementation = map ((\x->indentspace++x++".Implementation").cmModule) cmods
    in  unlines ([summarystrs]++cmodstrs++rawType++ffi++interface++cast++implementation)