Update of /cvsroot/gtk2hs/gtk2hs/tools/apiGen
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32165/tools/apiGen
Modified Files:
ApiGen.hs
Log Message:
Split ApiGen.hs into several modules to make it easier to manage and understand.
Index: ApiGen.hs
===================================================================
RCS file: /cvsroot/gtk2hs/gtk2hs/tools/apiGen/ApiGen.hs,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- ApiGen.hs 5 Feb 2005 01:21:47 -0000 1.11
+++ ApiGen.hs 5 Feb 2005 03:01:01 -0000 1.12
@@ -2,1183 +2,25 @@
-- binding module. Optionally it can be supplied with an xml documentation file
-- in which case the .chs file will contain haddock-format documentation too.
--- If you want to teach ApiGen how to marshal new types, the function you want
--- to modify is either genMarshalParameter or genMarshalResult near the end of
--- this file.
+-- If you want to teach ApiGen how to marshal new types, the you want to modify
+-- either genMarshalParameter or genMarshalResult in the Marshal module.
module Main (main) where
[...1213 lines suppressed...]
-lines [x] = x
-lines (x:xs) = x. sc '\n'. lines xs
-
-sepBy :: String -> [String] -> ShowS
-sepBy s [] = id
-sepBy s [x] = ss x
-sepBy s (x:xs) = ss x. ss s. sepBy s xs
-
-sepBy' :: String -> [ShowS] -> ShowS
-sepBy' s [] = id
-sepBy' s [x] = x
-sepBy' s (x:xs) = x. ss s. sepBy' s xs
-
-templateSubstitute :: String -> (String -> ShowS) -> ShowS
-templateSubstitute template varSubst = doSubst template
- where doSubst [] = id
- doSubst ('\\':'@':cs) = sc '@' . doSubst cs
- doSubst ('@':cs) = let (var,_:cs') = span ('@'/=) cs
- in varSubst var . doSubst cs'
- doSubst (c:cs) = sc c . doSubst cs
|