Alex Ferguson and (earlier) Yoshihiko Ichikawa ask for clarification of
the intent of the discussion on binary I/O.

It might help if I outline the capabilities of the Binary library
(currently available only for nhc13, but as Simon PJ notes, if you want
it in ghc/hugs, ask him).

>   1. Reading and writing binary data in a prescribed format.
>      Typical examples are image data in GIF, TIFF, Sun Raster etc,
>      and user-account statistics files used in Unix.

Easy to program using the Binary library.

>   2. Reading and writing part of Haskell data in a file.
>      This resembles the array dumping mechanism found in some
>      implementation of FORTRAN. 

Comes for free (by adding a "deriving" clause on your datatype).

>   3. Warm starting Haskell sessions or programs.
>      As found in ordinary implementations of Smalltalk, Lisp, 
>      and Yale implementation of Haskell.

Can be programmed, if it amounts to selecting appropriate data
structures to "save" at the end of one run and "reload" at the
beginning of the next.  (It is a far more difficult problem if you
want to save un-evaluated closures.)

>   4. Supporting orthogonal persistence in Haskell.
>      This may lead to a persistent Haskell implementation.

No, the Binary library doesn't lend itself to this.

Regards,
    Malcolm

[EMAIL PROTECTED]
Dr Malcolm Wallace (functional programming research)   +44 1904 434756
Department of Computer Science, University of York, YORK YO1 5DD, U.K.
------------------------------------http://www.cs.york.ac.uk/~malcolm/


Reply via email to