[Haskell-beginners] A first try
Manfred Lotz
manfred.lotz at arcor.de
Mon Jun 27 17:46:58 CEST 2011
On Mon, 27 Jun 2011 10:51:03 -0400
David Place <d at vidplace.com> wrote:
>
> On Jun 27, 2011, at 9:58 AM, Manfred Lotz wrote:
>
> >> To ensure that the entire file is read, you can seq on the length,
> >>
> >> xml <- U.hGetContents inh
> >> let content = parseXMLDoc xml
> >> length xml `seq` case content of ...
> >>
> >
> > Thanks a lot for the suggestion. Works fine.
> >
> > I only tried deepseq because my first try with seq
> >
> > let content = xml `seq` parseXMLDoc xml
> >
> > didn't work.
> >
>
> You can call me squeamish, but using a pure function (length) for its
> side-effects seems kind of kludge-y. :-)
>
Yes, I admit it looks strange. :-)
--
Manfred
More information about the Beginners
mailing list