The best thing to do is never to put an instance
declaration in an hi-boot file. I don't think you ever really
need to. In contrast, mutual recursion of type declarations
is often unavoidable.
The manual should really say this
Simon
| -Original Message-
| From: José Romildo
I don't really understand getContents. (Does anyone?) I have some code here
(far too large to submit). If I do (on Linux, ghc4.08.1, both with and without
optimisation)
--
contents - hGetContents handle
seq (last contents) (hClose handle)
--
On Thu, Oct 26, 2000 at 01:50:30AM -0700, Simon Peyton-Jones wrote:
The best thing to do is never to put an instance
declaration in an hi-boot file. I don't think you ever really
need to. In contrast, mutual recursion of type declarations
is often unavoidable.
I believe I can redesign
I don't really understand getContents. (Does anyone?) I
have some code here
(far too large to submit). If I do (on Linux, ghc4.08.1,
both with and without optimisation)
--
contents - hGetContents handle
seq (last contents) (hClose handle)
contents - hGetContents handle
seq (last contents) (hClose handle)
vs.
contents - hGetContents handle
hClose handle
However I looked at the manual and it seems that hClose should
force the whole of contents to be read anyway.
If some manual says this, it is wrong.
Simon Marlow wrote:
[snip]
"Once a semi-closed handle becomes closed, the contents of
the associated stream becomes fixed, and is the list of those
items which were succesfully read from that handle".
[snip]
Ah, now I see. I had assumed that hClose'ing a semi-closed