From c6e7f0c975c160fe83ce39964351507bdb8a7eca Mon Sep 17 00:00:00 2001 From: "resyntax-ci[bot]" <181813515+resyntax-ci[bot]@users.noreply.github.com> Date: Fri, 11 Oct 2024 00:29:51 +0000 Subject: [PATCH] Automated Resyntax fixes This is an automated change generated by Resyntax. #### Pass 1 Applied 3 fixes to [`typed-racket-lib/typed-racket/base-env/annotate-classes.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/base-env/annotate-classes.rkt) * Line 3, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. * Line 172, `if-else-false-to-and`: This `if` expression can be refactored to an equivalent expression using `and`. * Line 331, `define-values-values-to-define`: This use of `define-values` is unnecessary. Applied 1 fix to [`typed-racket-lib/typed-racket/base-env/ann-inst.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/base-env/ann-inst.rkt) * Line 8, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 1 fix to [`typed-racket-test/optimizer/reset-port.rkt`](../blob/HEAD/typed-racket-test/optimizer/reset-port.rkt) * Line 8, `read-line-any`: Specify a line mode of `'any` with `read-line` to avoid differences between Windows and other platforms. Applied 1 fix to [`typed-racket-lib/typed-racket/base-env/base-env-indexing-abs.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/base-env/base-env-indexing-abs.rkt) * Line 3, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 3 fixes to [`typed-racket-test/optimizer/transform.rkt`](../blob/HEAD/typed-racket-test/optimizer/transform.rkt) * Line 3, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. * Line 24, `read-line-any`: Specify a line mode of `'any` with `read-line` to avoid differences between Windows and other platforms. * Line 35, `if-begin-to-cond`: Using `cond` instead of `if` here makes `begin` unnecessary Applied 1 fix to [`typed-racket-lib/typed-racket/base-env/prims-lambda.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/base-env/prims-lambda.rkt) * Line 9, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 1 fix to [`typed-racket-lib/typed-racket/base-env/base-env-indexing.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/base-env/base-env-indexing.rkt) * Line 3, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 1 fix to [`typed-racket-lib/typed-racket/base-env/unit-prims.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/base-env/unit-prims.rkt) * Line 136, `map-to-for`: This `map` operation can be replaced with a `for/list` loop. Applied 1 fix to [`typed-racket-lib/typed-racket/base-env/base-structs.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/base-env/base-structs.rkt) * Line 14, `provide-deduplication`: Providing the same identifier multiple times is unnecessary. Applied 1 fix to [`typed-racket-lib/typed-racket/base-env/class-prims.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/base-env/class-prims.rkt) * Line 5, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 1 fix to [`typed-racket-test/optimizer/known-bugs.rkt`](../blob/HEAD/typed-racket-test/optimizer/known-bugs.rkt) * Line 3, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 2 fixes to [`typed-racket-lib/typed-racket/base-env/base-contracted.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/base-env/base-contracted.rkt) * Line 6, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. * Line 34, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 1 fix to [`typed-racket-lib/typed-racket/base-env/class-clauses.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/base-env/class-clauses.rkt) * Line 8, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 1 fix to [`typed-racket-lib/typed-racket/optimizer/sequence.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/optimizer/sequence.rkt) * Line 3, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 1 fix to [`typed-racket-lib/typed-racket/base-env/extra-env-lang.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/base-env/extra-env-lang.rkt) * Line 9, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 1 fix to [`typed-racket-lib/typed-racket/base-env/for-clauses.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/base-env/for-clauses.rkt) * Line 3, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 1 fix to [`typed-racket-lib/typed-racket/base-env/base-special-env.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/base-env/base-special-env.rkt) * Line 5, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 1 fix to [`typed-racket-lib/typed-racket/base-env/env-lang.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/base-env/env-lang.rkt) * Line 5, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 1 fix to [`typed-racket-lib/typed-racket/base-env/base-types-extra.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/base-env/base-types-extra.rkt) * Line 3, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 2 fixes to [`typed-racket-test/optimizer/run.rkt`](../blob/HEAD/typed-racket-test/optimizer/run.rkt) * Line 2, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. * Line 14, `read-line-any`: Specify a line mode of `'any` with `read-line` to avoid differences between Windows and other platforms. ## Summary Fixed 26 issues in 20 files. * Fixed 18 occurrences of `tidy-require` * Fixed 3 occurrences of `read-line-any` * Fixed 1 occurrence of `if-begin-to-cond` * Fixed 1 occurrence of `if-else-false-to-and` * Fixed 1 occurrence of `define-values-values-to-define` * Fixed 1 occurrence of `map-to-for` * Fixed 1 occurrence of `provide-deduplication` --- .../typed-racket/base-env/ann-inst.rkt | 5 +-- .../base-env/annotate-classes.rkt | 35 ++++++++----------- .../typed-racket/base-env/base-contracted.rkt | 16 ++++----- .../base-env/base-env-indexing-abs.rkt | 21 ++++++----- .../base-env/base-env-indexing.rkt | 9 +++-- .../base-env/base-special-env.rkt | 6 ++-- .../typed-racket/base-env/base-structs.rkt | 6 +++- .../base-env/base-types-extra.rkt | 4 +-- .../typed-racket/base-env/class-clauses.rkt | 8 ++--- .../typed-racket/base-env/class-prims.rkt | 35 +++++++++---------- .../typed-racket/base-env/env-lang.rkt | 7 ++-- .../typed-racket/base-env/extra-env-lang.rkt | 14 ++++---- .../typed-racket/base-env/for-clauses.rkt | 4 +-- .../typed-racket/base-env/prims-lambda.rkt | 12 +++---- .../typed-racket/base-env/unit-prims.rkt | 8 ++--- .../typed-racket/optimizer/sequence.rkt | 14 ++++---- typed-racket-test/optimizer/known-bugs.rkt | 18 +++++----- typed-racket-test/optimizer/reset-port.rkt | 2 +- typed-racket-test/optimizer/run.rkt | 8 +++-- typed-racket-test/optimizer/transform.rkt | 18 +++++----- 20 files changed, 125 insertions(+), 125 deletions(-) diff --git a/typed-racket-lib/typed-racket/base-env/ann-inst.rkt b/typed-racket-lib/typed-racket/base-env/ann-inst.rkt index 5dc9dcbf7..c92b19513 100644 --- a/typed-racket-lib/typed-racket/base-env/ann-inst.rkt +++ b/typed-racket-lib/typed-racket/base-env/ann-inst.rkt @@ -5,8 +5,9 @@ ;; This file is loaded by all Typed Racket programs, so it should not ;; have expensive runtime dependencies. -(require (for-syntax syntax/parse/pre "../private/syntax-properties.rkt" - racket/base) +(require (for-syntax racket/base + syntax/parse/pre + "../private/syntax-properties.rkt") "colon.rkt") (provide (for-syntax add-ann) ann inst row-inst) diff --git a/typed-racket-lib/typed-racket/base-env/annotate-classes.rkt b/typed-racket-lib/typed-racket/base-env/annotate-classes.rkt index d93e2b96e..7790a360e 100644 --- a/typed-racket-lib/typed-racket/base-env/annotate-classes.rkt +++ b/typed-racket-lib/typed-racket/base-env/annotate-classes.rkt @@ -1,13 +1,13 @@ #lang racket/base -(require syntax/parse/pre - racket/private/immediate-default +(require (for-label "colon.rkt") racket/list - racket/set racket/match + racket/private/immediate-default + racket/set + syntax/parse/pre "../private/parse-classes.rkt" - "../private/syntax-properties.rkt" - (for-label "colon.rkt")) + "../private/syntax-properties.rkt") (provide (all-defined-out)) ;; Data definitions @@ -169,7 +169,7 @@ #:with ty #'t)) (define-splicing-syntax-class optional-standalone-annotation (pattern (~optional a:standalone-annotation) - #:attr ty (if (attribute a) #'a.ty #f))) + #:attr ty (and (attribute a) #'a.ty))) (define-syntax-class type-variables #:attributes ((vars 1)) @@ -330,23 +330,16 @@ (define-values (all-mand-tys all-opt-tys) (cond [kw-property - (define-values (mand-kw-set opt-kw-set) - (values - (list->set (lambda-kws-mand kw-property)) - (list->set (lambda-kws-opt kw-property)))) - + (define mand-kw-set (list->set (lambda-kws-mand kw-property))) + (define opt-kw-set (list->set (lambda-kws-opt kw-property))) (define-values (mand-tys^ opt-kw^) - (partition (part-pred opt-kw-set) - (attribute mand.type-form))) - + (partition (part-pred opt-kw-set) (attribute mand.type-form))) + (define-values (opt-tys^ mand-kw^) - (partition (part-pred mand-kw-set) - (attribute opt.type-form))) - - (values (append mand-tys^ mand-kw^) - (append opt-tys^ opt-kw^))] - [else - (values (attribute mand.type-form) (attribute opt.type-form))]))] + (partition (part-pred mand-kw-set) (attribute opt.type-form))) + + (values (append mand-tys^ mand-kw^) (append opt-tys^ opt-kw^))] + [else (values (attribute mand.type-form) (attribute opt.type-form))]))] #:attr kw-property kw-property #:attr mand-tys (flatten all-mand-tys) diff --git a/typed-racket-lib/typed-racket/base-env/base-contracted.rkt b/typed-racket-lib/typed-racket/base-env/base-contracted.rkt index 8eb7b258b..b962a0666 100644 --- a/typed-racket-lib/typed-racket/base-env/base-contracted.rkt +++ b/typed-racket-lib/typed-racket/base-env/base-contracted.rkt @@ -3,14 +3,12 @@ ;; This file provides Typed Racket bindings for values that need ;; contract protection, even in typed code. -(require "../utils/utils.rkt" - "../utils/any-wrap.rkt" +(require (for-syntax racket/base + "../env/env-req.rkt") (prefix-in c: racket/contract) - (rename-in - racket/base - [default-continuation-prompt-tag -default-continuation-prompt-tag]) - (for-syntax racket/base - "../env/env-req.rkt")) + (rename-in racket/base [default-continuation-prompt-tag -default-continuation-prompt-tag]) + "../utils/any-wrap.rkt" + "../utils/utils.rkt") (provide default-continuation-prompt-tag) @@ -32,8 +30,8 @@ (module* #%type-decl #f (#%plain-module-begin (require typed-racket/env/global-env - typed-racket/types/abbrev - typed-racket/rep/type-rep) + typed-racket/rep/type-rep + typed-racket/types/abbrev) (register-type (quote-syntax default-continuation-prompt-tag) ;; TODO: we actually want the type diff --git a/typed-racket-lib/typed-racket/base-env/base-env-indexing-abs.rkt b/typed-racket-lib/typed-racket/base-env/base-env-indexing-abs.rkt index cd144a6a1..18811707f 100644 --- a/typed-racket-lib/typed-racket/base-env/base-env-indexing-abs.rkt +++ b/typed-racket-lib/typed-racket/base-env/base-env-indexing-abs.rkt @@ -1,13 +1,18 @@ #lang racket/base -(require - (for-template racket/base racket/list racket/unsafe/ops racket/flonum racket/extflonum racket/fixnum) - (for-syntax racket/base syntax/parse) - racket/stxparam - "../utils/tc-utils.rkt" - (rename-in "../types/abbrev.rkt" [-Boolean B] [-Symbol Sym]) - (rename-in "../types/numeric-tower.rkt" [-Number N]) - (only-in "base-structs.rkt" -Arity-At-Least)) +(require (for-syntax racket/base + syntax/parse) + (for-template racket/base + racket/extflonum + racket/fixnum + racket/flonum + racket/list + racket/unsafe/ops) + racket/stxparam + (rename-in "../types/abbrev.rkt" [-Boolean B] [-Symbol Sym]) + (rename-in "../types/numeric-tower.rkt" [-Number N]) + (only-in "base-structs.rkt" -Arity-At-Least) + "../utils/tc-utils.rkt") (provide indexing) diff --git a/typed-racket-lib/typed-racket/base-env/base-env-indexing.rkt b/typed-racket-lib/typed-racket/base-env/base-env-indexing.rkt index 0bf6b9c52..eedd89fe4 100644 --- a/typed-racket-lib/typed-racket/base-env/base-env-indexing.rkt +++ b/typed-racket-lib/typed-racket/base-env/base-env-indexing.rkt @@ -1,10 +1,9 @@ #lang racket/base -(require - "../utils/utils.rkt" - "../types/numeric-tower.rkt" - "../env/init-envs.rkt" - "base-env-indexing-abs.rkt") +(require "../env/init-envs.rkt" + "../types/numeric-tower.rkt" + "../utils/utils.rkt" + "base-env-indexing-abs.rkt") (define e (indexing -Integer)) (define (initialize-indexing) (initialize-type-env e)) diff --git a/typed-racket-lib/typed-racket/base-env/base-special-env.rkt b/typed-racket-lib/typed-racket/base-env/base-special-env.rkt index 39cb5e8e0..90d5bebb1 100644 --- a/typed-racket-lib/typed-racket/base-env/base-special-env.rkt +++ b/typed-racket-lib/typed-racket/base-env/base-special-env.rkt @@ -2,10 +2,10 @@ ;; this file cheats to define types for unexported variables ;; that are expanded into by Racket macros -(require "../env/init-envs.rkt" +(require (for-syntax racket/base) + "../env/init-envs.rkt" "../types/abbrev.rkt" - "../types/numeric-tower.rkt" - (for-syntax racket/base)) + "../types/numeric-tower.rkt") (provide make-template-identifier) (define (make-template-identifier what where) diff --git a/typed-racket-lib/typed-racket/base-env/base-structs.rkt b/typed-racket-lib/typed-racket/base-env/base-structs.rkt index 4ac4cd298..d9deff1c8 100644 --- a/typed-racket-lib/typed-racket/base-env/base-structs.rkt +++ b/typed-racket-lib/typed-racket/base-env/base-structs.rkt @@ -11,7 +11,11 @@ (require (for-template racket/base (prefix-in k: '#%kernel))) -(provide initialize-structs -Date -Srcloc -Date -Arity-At-Least -Exn) +(provide initialize-structs + -Date + -Srcloc + -Arity-At-Least + -Exn) (define-syntax define-hierarchy (syntax-rules (define-hierarchy) diff --git a/typed-racket-lib/typed-racket/base-env/base-types-extra.rkt b/typed-racket-lib/typed-racket/base-env/base-types-extra.rkt index ba3eb1bed..a5529ae1d 100644 --- a/typed-racket-lib/typed-racket/base-env/base-types-extra.rkt +++ b/typed-racket-lib/typed-racket/base-env/base-types-extra.rkt @@ -1,7 +1,7 @@ #lang racket/base -(require (for-syntax "type-name-error.rkt" - racket/base)) +(require (for-syntax racket/base + "type-name-error.rkt")) (define-syntax (define-other-types stx) (syntax-case stx () diff --git a/typed-racket-lib/typed-racket/base-env/class-clauses.rkt b/typed-racket-lib/typed-racket/base-env/class-clauses.rkt index 7b2c0bd91..3696cf144 100644 --- a/typed-racket-lib/typed-racket/base-env/class-clauses.rkt +++ b/typed-racket-lib/typed-racket/base-env/class-clauses.rkt @@ -5,12 +5,12 @@ ;; other parts of TR to use the bindings of init, public, etc. without ;; requiring prims.rkt -(require (prefix-in untyped: racket/class) - "colon.rkt" - (for-syntax racket/base +(require (for-syntax racket/base syntax/parse syntax/stx - "../private/syntax-properties.rkt")) + "../private/syntax-properties.rkt") + (prefix-in untyped: racket/class) + "colon.rkt") (provide (for-syntax class-clause clause diff --git a/typed-racket-lib/typed-racket/base-env/class-prims.rkt b/typed-racket-lib/typed-racket/base-env/class-prims.rkt index b9d04e8b1..97eb668e7 100644 --- a/typed-racket-lib/typed-racket/base-env/class-prims.rkt +++ b/typed-racket-lib/typed-racket/base-env/class-prims.rkt @@ -2,26 +2,25 @@ ;; This module provides TR primitives for classes and objects -(require (prefix-in untyped: racket/class) - "class-clauses.rkt" - "colon.rkt" +(require (for-syntax racket/base + racket/class + racket/list + racket/match + racket/syntax + syntax/kerncase + syntax/parse + syntax/stx + "../private/syntax-properties.rkt" + "../typecheck/internal-forms.rkt" + "../utils/disarm.rkt" + "../utils/tc-utils.rkt" + "annotate-classes.rkt") + (prefix-in untyped: racket/class) + (only-in "prims.rkt" (define tr:define)) "../private/class-literals.rkt" "../utils/typed-method-property.rkt" - (only-in "prims.rkt" [define tr:define]) - (for-syntax - racket/base - racket/class - racket/list - racket/match - racket/syntax - syntax/kerncase - syntax/parse - syntax/stx - "../typecheck/internal-forms.rkt" - "annotate-classes.rkt" - "../private/syntax-properties.rkt" - "../utils/disarm.rkt" - "../utils/tc-utils.rkt")) + "class-clauses.rkt" + "colon.rkt") (provide ;; Typed class macro that coordinates with TR class diff --git a/typed-racket-lib/typed-racket/base-env/env-lang.rkt b/typed-racket-lib/typed-racket/base-env/env-lang.rkt index d30ee4d93..9ce41a80e 100644 --- a/typed-racket-lib/typed-racket/base-env/env-lang.rkt +++ b/typed-racket-lib/typed-racket/base-env/env-lang.rkt @@ -2,13 +2,14 @@ (require "../utils/utils.rkt") -(require (for-syntax racket/base syntax/parse) +(require (for-syntax racket/base + syntax/parse) racket/stxparam - "../utils/tc-utils.rkt" "../env/init-envs.rkt" "../types/abbrev.rkt" "../types/numeric-tower.rkt" - "../types/prop-ops.rkt") + "../types/prop-ops.rkt" + "../utils/tc-utils.rkt") (define-syntax (-#%module-begin stx) (define-syntax-class clause diff --git a/typed-racket-lib/typed-racket/base-env/extra-env-lang.rkt b/typed-racket-lib/typed-racket/base-env/extra-env-lang.rkt index a696e5057..7d434bb70 100644 --- a/typed-racket-lib/typed-racket/base-env/extra-env-lang.rkt +++ b/typed-racket-lib/typed-racket/base-env/extra-env-lang.rkt @@ -6,18 +6,18 @@ ;; ;; Also see env-lang.rkt -(require "../utils/utils.rkt" - (for-syntax "../private/parse-type.rkt" - "type-name-error.rkt" - racket/base - (only-in racket/splicing splicing-syntax-parameterize) +(require (for-syntax racket/base syntax/parse syntax/stx + (only-in racket/splicing splicing-syntax-parameterize) + "../private/parse-type.rkt" "../types/abbrev.rkt" "../types/numeric-tower.rkt" "../types/prop-ops.rkt" - "../utils/struct-info.rkt") - (for-meta 2 (only-in racket/base #%app quote))) + "../utils/struct-info.rkt" + "type-name-error.rkt") + (for-meta 2 (only-in racket/base #%app quote)) + "../utils/utils.rkt") (provide type-environment (rename-out [-#%module-begin #%module-begin]) diff --git a/typed-racket-lib/typed-racket/base-env/for-clauses.rkt b/typed-racket-lib/typed-racket/base-env/for-clauses.rkt index 70ca31276..f6eee9c75 100644 --- a/typed-racket-lib/typed-racket/base-env/for-clauses.rkt +++ b/typed-racket-lib/typed-racket/base-env/for-clauses.rkt @@ -1,7 +1,7 @@ #lang racket/base -(require syntax/parse/pre - (for-template (only-in racket/base quote)) +(require (for-template (only-in racket/base quote)) + syntax/parse/pre "annotate-classes.rkt") (provide (all-defined-out)) diff --git a/typed-racket-lib/typed-racket/base-env/prims-lambda.rkt b/typed-racket-lib/typed-racket/base-env/prims-lambda.rkt index d1312a62c..8406673bd 100644 --- a/typed-racket-lib/typed-racket/base-env/prims-lambda.rkt +++ b/typed-racket-lib/typed-racket/base-env/prims-lambda.rkt @@ -6,14 +6,14 @@ ;; In particular, "parse-type.rkt" needs the binding of the TR ;; case-lambda in order to match for case-lambda types. -(require "colon.rkt" - "ann-inst.rkt" - (for-syntax "annotate-classes.rkt" - "../private/syntax-properties.rkt" - racket/base +(require (for-syntax racket/base racket/syntax + syntax/parse/pre syntax/stx - syntax/parse/pre)) + "../private/syntax-properties.rkt" + "annotate-classes.rkt") + "ann-inst.rkt" + "colon.rkt") (provide (rename-out [-case-lambda case-lambda] [-case-lambda case-lambda:] diff --git a/typed-racket-lib/typed-racket/base-env/unit-prims.rkt b/typed-racket-lib/typed-racket/base-env/unit-prims.rkt index f647bc194..8f2f7f2bb 100644 --- a/typed-racket-lib/typed-racket/base-env/unit-prims.rkt +++ b/typed-racket-lib/typed-racket/base-env/unit-prims.rkt @@ -133,12 +133,8 @@ ;; in the signature, this is needed to typecheck define-values/invoke-unit forms (define-for-syntax (imports/members sig-id) (define-values (_1 imp-mem _2 _3) (signature-members sig-id sig-id)) - #`(#,sig-id #,@(map (lambda (id) - (local-expand - id - (syntax-local-context) - (kernel-form-identifier-list))) - imp-mem))) + #`(#,sig-id #,@(for/list ([id (in-list imp-mem)]) + (local-expand id (syntax-local-context) (kernel-form-identifier-list))))) ;; Given a list of signature specs ;; Processes each signature spec to determine the variables exported diff --git a/typed-racket-lib/typed-racket/optimizer/sequence.rkt b/typed-racket-lib/typed-racket/optimizer/sequence.rkt index 5ab6bf0d2..d47ba3065 100644 --- a/typed-racket-lib/typed-racket/optimizer/sequence.rkt +++ b/typed-racket-lib/typed-racket/optimizer/sequence.rkt @@ -1,16 +1,18 @@ #lang racket/base -(require syntax/parse - racket/match +(require (for-template racket/base + racket/unsafe/ops) racket/function + racket/match + syntax/parse syntax/parse/experimental/specialize - (for-template racket/base racket/unsafe/ops) - "../utils/utils.rkt" "../utils/tc-utils.rkt" "../rep/type-rep.rkt" "../types/abbrev.rkt" - "utils.rkt" + "../utils/tc-utils.rkt" + "../utils/utils.rkt" + "float.rkt" "logging.rkt" - "float.rkt") + "utils.rkt") (provide sequence-opt-expr) diff --git a/typed-racket-test/optimizer/known-bugs.rkt b/typed-racket-test/optimizer/known-bugs.rkt index a31e8bcbc..3a92dfdf4 100644 --- a/typed-racket-test/optimizer/known-bugs.rkt +++ b/typed-racket-test/optimizer/known-bugs.rkt @@ -1,14 +1,14 @@ #lang racket/base -(require - rackunit - racket/sandbox - racket/flonum racket/fixnum racket/unsafe/ops - racket/math - syntax/srcloc - (for-syntax - racket/base - syntax/parse)) +(require (for-syntax racket/base + syntax/parse) + racket/fixnum + racket/flonum + racket/math + racket/sandbox + racket/unsafe/ops + rackunit + syntax/srcloc) (provide tests) diff --git a/typed-racket-test/optimizer/reset-port.rkt b/typed-racket-test/optimizer/reset-port.rkt index 913fb5678..a0859be36 100644 --- a/typed-racket-test/optimizer/reset-port.rkt +++ b/typed-racket-test/optimizer/reset-port.rkt @@ -5,7 +5,7 @@ (provide read-syntax) (define (read-syntax name port) - (read-line port) + (read-line port 'any) (when (port-counts-lines? port) (set-port-next-location! port 1 0 1)) (make-special-comment 'typed-racket/optimizer/reset-port)) diff --git a/typed-racket-test/optimizer/run.rkt b/typed-racket-test/optimizer/run.rkt index 4795a01b9..ad861a575 100644 --- a/typed-racket-test/optimizer/run.rkt +++ b/typed-racket-test/optimizer/run.rkt @@ -1,6 +1,8 @@ #lang racket -(require racket/runtime-path compiler/compiler - rackunit rackunit/text-ui +(require compiler/compiler + racket/runtime-path + rackunit + rackunit/text-ui typed-racket/optimizer/logging "../send-places.rkt") @@ -11,7 +13,7 @@ (define (get-expected-results file) (with-input-from-file file #:mode 'text (lambda () ; from the test file - (read-line) ; skip the #;#; + (read-line (current-input-port) 'any) ; skip the #;#; (values (for/list ((l (in-lines (open-input-string (read))))) l) (read))))) diff --git a/typed-racket-test/optimizer/transform.rkt b/typed-racket-test/optimizer/transform.rkt index dced57d72..a9e778b28 100644 --- a/typed-racket-test/optimizer/transform.rkt +++ b/typed-racket-test/optimizer/transform.rkt @@ -1,6 +1,7 @@ #lang racket -(require "run.rkt" "../send-places.rkt") +(require "../send-places.rkt" + "run.rkt") (module test racket/base (displayln "run as program for tests")) @@ -21,7 +22,7 @@ (define source-code (call-with-input-file* (build-path dir file) (lambda (in) - (read-line in) ; drop the #;#; + (read-line in 'any) ; drop the #;#; (read in) ; drop the old expected tr log (read in) ; drop the old expected output (port->string in)))) @@ -32,13 +33,12 @@ (for ((entry new-tr-log)) (write-stringln entry)) (write-stringln "END") - (if (regexp-match "\n" new-output) - (begin - (write-stringln "#<