[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] C5 Type declaration issue

From: Jörg F . Wittenberger
Subject: [Chicken-users] C5 Type declaration issue
Date: 17 Aug 2018 19:54:02 +0200

This is an instance of an error I'm getting frequently:

/home/u/c5/bin/csc -setup-mode -static -I /home/u/traces/srfi-128 -emit-link-file /home/u/traces/srfi-128/ -host -D compiling-extension -c -unit srfi-128 -D compiling-static-extension -C -I/home/u/traces/srfi-128 -O3 -d2 /home/u/traces/srfi-128/srfi-128.scm -o /home/u/traces/srfi-128/srfi-128.static.o

Warning: at toplevel:
assignment of value of type `(procedure srfi-128#make-comparator (* * * *) (struct srfi-128#comparator))' to toplevel variable `srfi-128#make-comparator' does not match declared type `(procedure srfi-128#make-comparator ((or true (procedure :type-test: (*) boolean)) (or true (procedure :comparison-test: (* *) boolean)) (or false (procedure :comparison-test: (* *) boolean)) (or false (procedure :hash-function: (*) fixnum))) (struct comparator))'

The relevant code excerpt from
file comperators/comperators.scm:

 (define-type :comparator: (struct comparator))
 (define-type :type-test: (procedure (*) boolean))
 (define-type :comparison-test: (procedure (* *) boolean))
 (define-type :hash-code: fixnum)
 (define-type :hash-function: (procedure (*) :hash-code:))

(: make-comparator
  ((or true :type-test:)
   (or true :comparison-test:)
   (or false :comparison-test:)
   (or false :hash-function:)
   --> :comparator:))

(define (make-comparator type-test equality ordering hash)

How to deal with this?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]