Alexandre Weffort Thenorio wrote:
OK. Here is what happen. I wrote the small haskell program that write another haskell program containing a string representation of the bin file.
If use openFile function the string representation is not complete (Doesn't write the whole bin file, bug maybe) but if I use openFileEx (IOExts Library, Lang Package) it writes the whole thing
BUT both ways it still gives me a file with a binary string representation (Weird sings) like:
module MyBinFile ( mybinfile ) where mybinfile :: String mybinfile = "Ì þs$>Ì Ì þVÌ 01o ¦·?sfÌ{%z-æÇdæÇe_ Æe\\\\ÃàQ'%Ñàz&òÆdÑày&çÖà{ÇdÖà|Çez-ÆdçÆeç? 00 0...."
thus of course giving me a error in character literal in third line when trying to run the old main (That is gonna rewrite the bin file). Any ideas??
Use "show", e.g. hPutStrLn outFile $ "mybinfile = " ++ show theString -- Glynn Clements <glynn.clements@virgin.net>