Is there a linear file type is the ATS2 default library?

27 views
Skip to first unread message

Yannick Duchêne

unread,
Feb 10, 2015, 6:44:57 PM2/10/15
to ats-lan...@googlegroups.com
Hi people,

I'm looking (back since some time) at “Chapter 13. Introduction to Views and Viewtypes” and a question I already had in mind came back: is there a linear file type in the default ATS2 library? I mean a file type you must close after you've opened it.

Hongwei Xi

unread,
Feb 10, 2015, 7:27:50 PM2/10/15
to ats-lan...@googlegroups.com

On Tue, Feb 10, 2015 at 6:44 PM, 'Yannick Duchêne' via ats-lang-users <ats-lan...@googlegroups.com> wrote:
Hi people,

I'm looking (back since some time) at “Chapter 13. Introduction to Views and Viewtypes” and a question I already had in mind came back: is there a linear file type in the default ATS2 library? I mean a file type you must close after you've opened it.

--
You received this message because you are subscribed to the Google Groups "ats-lang-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/507323ba-ddc5-43a0-8454-8d23a2fb7cce%40googlegroups.com.

Yannick Duchêne

unread,
Feb 11, 2015, 9:51:12 AM2/11/15
to ats-lan...@googlegroups.com


Le mercredi 11 février 2015 01:27:50 UTC+1, gmhwxi a écrit :

 If I may, I need a bit of a hint or help for a simple start.

If I do this:

     staload "libc/SATS/stdio.sats"
     val out = fopen_exn(FILE_NAME, file_mode_w)
     val x = fflush1(out)
     val () = fclose1_exn(out)

I get an error as `fflush1` expects a proof argument. I feel to understand it's expected to be a proof `out` is in write‑mode. But neither `fopen_exn` nor `fopen` returns this proof. How to get a proof `out` was opened with `file_mode_w`?

Hongwei Xi

unread,
Feb 11, 2015, 9:57:34 AM2/11/15
to ats-lan...@googlegroups.com
val x = fflush(file_mode_lte_w_w | out)


--
You received this message because you are subscribed to the Google Groups "ats-lang-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
Visit this group at http://groups.google.com/group/ats-lang-users.
Reply all
Reply to author
Forward
0 new messages