Commits

evhan  committed 51ce613

emit & install types file when installing for CHICKEN

  • Participants
  • Parent commits 0fc2122

Comments (0)

Files changed (2)

File siphash-chicken.scm

   (define bytevector-u8-ref u8vector-ref)
   (define bytevector-copy subu8vector)
   (define bytevector? u8vector?)
-  (define string->utf8
-    (lambda (x)
-      (blob->u8vector (string->blob x))))
+  (define string->utf8 (lambda (x) (blob->u8vector (string->blob x))))
+  (define-type bytevector u8vector)
+  (define-type input (or string bytevector))
+  (define-type siphash (input #!optional input -> (or (input -> fixnum) fixnum)))
+  (: make-siphash (fixnum fixnum -> siphash))
+  (: siphash-2-4 siphash)
+  (: siphash-4-8 siphash)
   (include "siphash.scm"))

File siphash.setup

-(compile -X numbers-syntax -sJ -O3 -d0 siphash-chicken.scm -o siphash.so)
+(compile -X numbers-syntax -emit-type-file siphash.types -sJ -O3 -d0 siphash-chicken.scm -o siphash.so)
 (compile -unit siphash -uses numbers -X numbers-syntax -cJ -O3 -d0 siphash-chicken.scm -o siphash.o)
 (compile -s -O3 -d0 siphash.import.scm)
 (install-extension 'siphash
-  '("siphash.so" "siphash.import.so" "siphash.o")
+  '("siphash.so" "siphash.import.so" "siphash.o" "siphash.types")
   '((version "0.0.2")))