[Top][All Lists]

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

[Chicken-users] Question about procedure type annotations

From: megane
Subject: [Chicken-users] Question about procedure type annotations
Date: Wed, 24 Oct 2012 18:54:09 +0300
User-agent: mu4e 0.9.9-dev4; emacs 24.1.1


Below is an example that fails.

Is this expected behavior? It feels a bit redundant to use 'assume' for
the parameter 'a' as the type for the procedure has already been

(: foo (fixnum -> undefined))
(define (foo a)
    (compiler-typecase a
      (fixnum #t))
    (else #t)))
  (print a))

;; Error: in toplevel procedure `foo':
;;   (test1.scm:2) no clause applies in `compiler-typecase' for expression of 
type `*':
;;     fixnum

reply via email to

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