Update of /cvsroot/hoc/hoc/InterfaceGenerator
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7563/InterfaceGenerator
Modified Files:
Headers.hs
Log Message:
*) Derrive Show instance for HeaderInfo (for debugging purposes)
*) make stripPreprocessor retain empty lines in place of preprocessor
directives
Index: Headers.hs
===================================================================
RCS file: /cvsroot/hoc/hoc/InterfaceGenerator/Headers.hs,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- Headers.hs 5 Apr 2004 00:04:46 -0000 1.3
+++ Headers.hs 31 Mar 2005 20:50:32 -0000 1.4
@@ -12,6 +12,7 @@
type ModuleName = String
data HeaderInfo = HeaderInfo ModuleName [ModuleName] [Declaration]
+ deriving(Show)
stripPreprocessor = unlines . stripPP . lines
where
@@ -19,8 +20,8 @@
stripPP (x : xs) = x : stripPP xs
stripPP [] = []
dropPreprocessorLine x xs
- | last x == '\\' = dropPreprocessorLine (head xs) (tail xs)
- | otherwise = stripPP xs
+ | last x == '\\' = "" : dropPreprocessorLine (head xs) (tail xs)
+ | otherwise = "" : stripPP xs
findImports = mapMaybe checkImport . lines
where
|