Hi!

This patch addresses #1690 by hand-expanding the use of "and" in types.db,
which can not work, since syntax is already expanded when the compiler 
specializes.


felix

From 8f02b616edcdc3354e4fd622ff275e596741893c Mon Sep 17 00:00:00 2001
From: felix <fe...@call-with-current-continuation.org>
Date: Thu, 26 Mar 2020 10:17:23 +0100
Subject: [PATCH] Hand-expand use of "and" in specialization rules for
 "irregex-match?"

---
 types.db | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/types.db b/types.db
index 5f018e44..43f0a741 100644
--- a/types.db
+++ b/types.db
@@ -1638,9 +1638,9 @@
 
 ;; A silly procedure, but at least we can "inline" it like this
 (chicken.irregex#irregex-match? (#(procedure #:clean #:enforce) 
chicken.irregex#irregex-match? (* string #!optional fixnum fixnum) boolean)
-                ((* string) (and (chicken.irregex#irregex-match #(1) #(2)) 
'#t))
-                ((* string fixnum) (and (chicken.irregex#irregex-match #(1) 
#(2) #(3)) '#t))
-                ((* string fixnum fixnum) (and (chicken.irregex#irregex-match 
#(1) #(2) #(3) #(4)) '#t)))
+                ((* string) (if (chicken.irregex#irregex-match #(1) #(2)) '#t 
'#f))
+                ((* string fixnum) (if (chicken.irregex#irregex-match #(1) 
#(2) #(3)) '#t '#f))
+                ((* string fixnum fixnum) (if (chicken.irregex#irregex-match 
#(1) #(2) #(3) #(4)) '#t '#f)))
 ;; These two return #f or a match object
 (chicken.irregex#irregex-match (#(procedure #:clean #:enforce) 
chicken.irregex#irregex-match (* string #!optional fixnum fixnum)
                 (or false (struct regexp-match))))
-- 
2.21.0

Reply via email to