[Haskell-cafe] Re: strange ghc program behaviour

2006-03-22 Thread Koen . Roelandt
From ghc-6.4, the runtime system no longer flushes open files; it
truncates them instead.  You should close (or flush) the file explicitly
with 'hClose' or 'hFlush' before the program terminates.


I added 'hClose' to processXmlWith in the Wrapper module. That solved the 
problem.
Thank you!
Malcolm, concerning HaXml choking on finding an ampersand (or %) in an 
attribute value (my earlier post): this occurred when the ampersand was 
part of an entity. I solved it by replacing the values for  and % in the 
Lex module (not very elegant, I admit). 

Cheers,

K.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: strange ghc program behaviour

2006-03-21 Thread Christian Maeder
I remember that we had problems with HaXml producing empty or truncated 
files, too.


I think with ghc-6.4.1 and HaXml-1.13 this problem was solved. (The 
deprecated stuff is definitely not the cause).


The problem must have been related to the output handle being either 
stdout or a file (and maybe a missing flush).


HTH Christian

[EMAIL PROTECTED] wrote:

Hi,

I'm a Haskell newbie using HaXml for the conversion of xml files into html 
files. I'm using GHC 6.4 to compile the program.
When I run the program, it will not convert the whole file: the document 
tree is incomplete and will stop when the limit of e.g. 8k has been 
reached.


E.g. An xml file of 12.3k will result in a file of 8k and will stop at 8k
An xml file of 15.7k will result in a file of 16k
An xml file of 36k will result in a file of 24k

In an output to the screen (and not to a file), the whole document tree is 
being generated.

Am I missing something obvious here (memory issues)?
On compilation, ghc issues warnings about the class FiniteMap and Module 
IOExts being deprecated. Is this the cause?

Any ideas?

Cheers,

K.

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe