First Class File IO

Erik Zuurbier F.S.A.Zuurbier@inter.nl.net
Sun, 21 Dec 1997 00:08:54 +0100


I read the article by Marco Pil "First Class File IO"
I have the following questions.

It looks like the only way that the type of a file can be accessed
is matching it against an assumed type. If it does not match, that is it.
The clean compiler's type checker gives error messages with some
details about why two types did not unify. Will such details be available
for run time type checking also?

If a particular file's type is simply not known (forgotten, that is),
will there be some utility program that can be used to reveal the type?

If we want real safety, we do not want a hacker to take a file and
edit some of it without this being noticed by the clean program that
subsequently uses the file. Is there going to be some protection?
E.g. adding a signature of the file (a hash value) on closing the file
and checking the signature on opening it again.

If a file contains a value of type [a] or Tree a, or whatever container type,
will there be the possibility to subsequently read selected values
(of type a) only, or will the whole container have to fit in the heap when
the file is read?

Regards Erik Zuurbier