File: files.thi

package info (click to toggle)
theme-d 7.2.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 21,036 kB
  • sloc: lisp: 9,625; sh: 5,321; makefile: 715; ansic: 477
file content (40 lines) | stat: -rw-r--r-- 1,257 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
;; -*-theme-d-*-

;; Copyright (C) 2020 Tommi Höynälänmaa
;; Distributed under GNU Lesser General Public License version 3,
;; see file doc/LGPL-3.

(define-interface (standard-library files)

  (import (standard-library core))

  (define-foreign-prim-class <eof>
    (attributes checked use-eq?)
    (member-pred eof-object?))

  (define-foreign-prim-class <input-port>
    (attributes checked use-eq?)
    (member-pred input-port?))
    
  (define-foreign-prim-class <output-port>
    (attributes checked use-eq?)
    (member-pred output-port?))

  (declare-method make-eof (:simple-proc () <eof> nonpure))

  (declare-method eof? <type-predicate>)

  (declare-method open-output-file (:simple-proc (<string>) <output-port>
                                                 nonpure))

  (declare-method open-input-file (:simple-proc (<string>) <input-port>
                                                nonpure))

  (declare-method close-output-port (:simple-proc (<output-port>) <none>
                                                  nonpure))

  (declare-method close-input-port (:simple-proc (<input-port>) <none>
                                                 nonpure))

  (declare-method flush-all-ports (:simple-proc () <none> nonpure)))