[Haskell-beginners] strange behavior

Luca Ciciriello luca_ciciriello at hotmail.com
Wed Jun 16 09:34:15 EDT 2010

Hi All.
I'm experimenting a strange behavior. I've wrote in Haskell a tool to automatic generate C++ code. All works fine if I use GHCi or compile with GHC on WIndows, but I see the strange behavior if I use my program on MacOS X 10.6.4

In example, the portion of code here below 

createConstructor :: [String] -> String -> [String]
createConstructor xs classname = ["\t\tpublic: " ++ classname ++ "()\n\t\t{"]  ++
                                                              ["\t\t\t" ++ (snd (makePair x)) ++ " = nullptr;" | x <- xs] ++ 

on Windows generate:

                public: DAT_CDM_Enum()
                 	fileName = nullptr; 
                	filePath = nullptr; 
			fileType = nullptr;

but on MacOS X 10.6.4 I have:

                public: DAT_CDM_Enum()
 = nullptr;     	fileName
 = nullptr;     	filePath
			fileType = nullptr;

This is a very weird behavior to me.
I'm using Haskell platform (ghc 6.12.1) on MacOS X and on Windows.

Any idea?


More information about the Beginners mailing list