source: project/release/4/srfi-27/trunk/srfi-27-common-types.scm @ 35485

Last change on this file since 35485 was 35485, checked in by kon, 5 months ago

add vector & registration types

File size: 1.2 KB
Line 
1;;;; srfi-27-common-types.scm
2;;;; Kon Lovett, Apr '18
3
4;; Issues
5;;
6
7(define-type alist list)
8
9(define-type entropy-source (struct entropy-source))
10
11(define-type entropy-source-name symbol)
12
13(define-type random-source (struct random-source))
14
15(define-type random-source-name symbol)
16
17;FIXME random-source-state is really type *
18(define-type random-source-state list)
19
20(define-type boolean-function (--> boolean))
21
22(define-type number-function (--> number))
23
24;FIXME cannot restrict number domain w/ type system
25
26(define-type random-integer-function (number --> number))
27
28;fortran "real"
29(define-type random-real-function (--> float))
30
31(define-type random-u8-function  (--> fixnum))
32
33(define-type random-f64-function  (--> float))
34
35(define-type random-u8vector-function (fixnum --> u8vector))
36
37(define-type random-f64vector-function (fixnum --> f64vector))
38
39(define-type random-source-entropy-source (or boolean entropy-source))
40
41(define-type source-registration (struct source-registration))
42
43(define-type source-registration-name (or entropy-source-name random-source-name))
44
45(define-type srfi-27-vector (or vector f32vector f64vector))
46
47(define-type random-vector-function (fixnum --> vector))
Note: See TracBrowser for help on using the repository browser.