On Wed, Jun 10, 2026 at 07:03:06PM +0800, Qian Yun wrote:
> On 6/9/26 10:49 PM, Qian Yun wrote:
> > Latest commit 4778988f "Add openIfCan" added test
> > that fails on Windows.
> >
>
> Further more, the single argument variate is not implemented
> for KeyedAccessFile:
>
> f : FileName -> Union(KAFILE INT,"failed") := openIfCan$KAFILE INT
> Internal Error
Yes, this one is currently missing. I am thinking what to do here.
KeyedAccessFile has apparently undocumented mode "either" and it
is used for one argument 'open'. But documentation in
FileCategory says that one argument version uses "input".
I am not sure if anythig/anyone depends on "either". Actually,
I would like to have consistent modes for all files and
"either" looks strange. It is not clear to me if "either"
for single argument version is of any use: in case of non
existing KAF it creates empty one and effectively opens it for
input. But input from empty KAF does not look useful. OTOH
I was thinking about adding "append" for all files. For
sequential files "append" makes clear sense and for KAF
files natural meaning of "append" corresponds to what
"either" is doing now (that is preserving existing data in
the file).
> And the error message should be changed to fname:
> error ["Can not open: ", mode]
Yes.
--
Waldek Hebisch