diff --git a/collects/mzlib/pconvert.ss b/collects/mzlib/pconvert.ss index 89c03b2ff7..fee0f9b4df 100644 --- a/collects/mzlib/pconvert.ss +++ b/collects/mzlib/pconvert.ss @@ -125,6 +125,7 @@ 'atomic] [(and (not (struct? expr)) ;; struct names are the wrong thing, here (not (regexp? expr)) + (not (byte-regexp? expr)) (not (procedure? expr)) (not (promise? expr)) (not (object? expr)) @@ -360,8 +361,12 @@ (if (list? arity) `(case-lambda . ,(make-lambda-helper arity)) `(lambda ,(make-lambda-helper arity) ...)))))] - [(regexp? expr) `(regexp ,(or (object-name expr) - '...))] + [(regexp? expr) `(,(if (pregexp? expr) 'pregexp 'regexp) + ,(or (object-name expr) + '...))] + [(byte-regexp? expr) `(,(if (byte-pregexp? expr) 'byte-pregexp 'byte-regexp) + ,(or (object-name expr) + '...))] [(module-path-index? expr) (let-values ([(left right) (module-path-index-split expr)]) `(module-path-index-join ,(recur left) ,(recur right)))] diff --git a/collects/mzlib/string.ss b/collects/mzlib/string.ss index e1e0c21bec..9195545c3a 100644 --- a/collects/mzlib/string.ss +++ b/collects/mzlib/string.ss @@ -137,7 +137,7 @@ (map (lambda (c) (cond - [(memq c '(#\$ #\| #\\ #\[ #\] #\. #\* #\? #\+ #\( #\) #\^)) + [(memq c '(#\$ #\| #\\ #\[ #\] #\. #\* #\? #\+ #\( #\) #\^ #\{ #\})) (list #\\ c)] [(and (not case-sens?) (not (char=? (char-upcase c) (char-downcase c))))