Re: hat-trail: attempt to read beyond end of file

Malcolm Wallace <[email protected]> Sat, 14 Oct 2006 16:55:02 +0100
Newsgroups gmane.comp.lang.haskell.hat
Organization Dept of Computer Science, University of York
Message-ID <[email protected]>
Barzille <[email protected]> writes:

> http://www.nabble.com/file/3632/Insort.hat Insort.hat 

Ah, yes I can reproduce the errors you saw.  As best I can tell, the
generated .hat file has machine words stored in the wrong byte-order.
This means all the internal file pointers are wrong.  They are supposed
to be stored in network (big-endian) order, but your .hat file has them
stored in little-endian order.

The likeliest cause is that your platform does not implement the C-level
htonl() and ntohl() macros/functions correctly.

Can you tell us what machine architecture and operating system you are
using?  You mentioned that installation was difficult.  What did you
need to do that was unusual?

Regards,
    Malcolm