chicken-hackers
[Top][All Lists]
Advanced

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

Re: irregex-match? & specialize question


From: felix . winkelmann
Subject: Re: irregex-match? & specialize question
Date: Tue, 24 Mar 2020 20:06:42 +0100

> = I must be missing something
>
> cat >matches-prob-test.scm <<'HERE'
> (import scheme)
> (import (chicken irregex))
>
> (define (uses-predicate str)
>   (and
>     (string? str)
>     (irregex-match? '(: "foo") str) ) )
>
> (print "uses-predicate: " (uses-predicate ""))
> HERE
>
> csc ./matches-prob-test.scm
> ./matches-prob-test
> #uses-predicate: #f
>
> csc -specialize ./matches-prob-test.scm
> ./matches-prob-test
> #Error: unbound variable: and
>

Ouch. The "and" introduced by the specialization of irregex-match?
(types.db:1642)  is wrong, syntax is already expanded at this stage, so the
"and" will be treated as a (nonexistent) procedure.

You can temporarily remove these rules in types.db to have a working
system until this is fixed.


felix




reply via email to

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