chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] regression - probably in let*


From: Evan Hanson
Subject: Re: [Chicken-hackers] regression - probably in let*
Date: Sun, 5 Jul 2015 14:17:35 +1200

On 2015-07-04 12:10, Jörg F. Wittenberger wrote:
> That's actually possible and I must admit that I did so quite some times
> when I had to have a variable changing type.
> 
> However my source goes through some trick (which might no longer be
> necessary, I never re-checked).  This xthe syntax does the trick for me:
> 
> (: xthe-identity-inline (* --> *))
> (define-inline (xthe-identity-inline x) x)
> (define-syntax xthe
>   (syntax-rules ()
>     ((_ type val) (the type (xthe-identity-inline val)))))

Clever hack. Unfortunately, without such a trick, using `the` in this way fails
with the message below (as you know already). I think it should really be
allowed, though.

    Warning: in toplevel procedure `foo?':
     expression returns a result of type `fixnum', but is declared to return 
`number', which is not a subtype
    
    Error: some variable types do not satisfy strictness

I've created https://bugs.call-cc.org/ticket/1198 for this.

Cheers,

Evan



reply via email to

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