From c9a754132a4c91030a6f2aafe8cdcbc71d05f925 Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Thu, 23 Aug 2012 11:23:28 -0400 Subject: [PATCH] Refactoring of new `tc-app`. original commit: 514c1c5921a83297a8f305678d95d7f2357a7180 --- .../typecheck/tc-app-combined.rkt | 27 +++++++++++++++++++ .../{tc-app.rkt => tc-app/tc-app-main.rkt} | 6 ++--- .../typed-racket/typecheck/tc-app/utils.rkt | 1 + .../typed-racket/typecheck/typechecker.rkt | 2 +- 4 files changed, 32 insertions(+), 4 deletions(-) create mode 100644 collects/typed-racket/typecheck/tc-app-combined.rkt rename collects/typed-racket/typecheck/{tc-app.rkt => tc-app/tc-app-main.rkt} (97%) diff --git a/collects/typed-racket/typecheck/tc-app-combined.rkt b/collects/typed-racket/typecheck/tc-app-combined.rkt new file mode 100644 index 00000000..0446df45 --- /dev/null +++ b/collects/typed-racket/typecheck/tc-app-combined.rkt @@ -0,0 +1,27 @@ +#lang racket/base + +(require "../utils/utils.rkt" + + "tc-app/tc-app-apply.rkt" + "tc-app/tc-app-eq.rkt" + "tc-app/tc-app-hetero.rkt" + "tc-app/tc-app-keywords.rkt" + "tc-app/tc-app-lambda.rkt" + "tc-app/tc-app-list.rkt" + "tc-app/tc-app-objects.rkt" + "tc-app/tc-app-special.rkt" + "tc-app/tc-app-values.rkt" + "tc-app/tc-app-main.rkt" + "tc-app/signatures.rkt" + "signatures.rkt") + +(require racket/unit) +(provide tc-app-combined@) + +(define-compound-unit/infer tc-app-combined@ + (import tc-expr^ tc-lambda^ tc-let^ tc-apply^) + (export tc-app^) + + (link tc-app-main@ + tc-app-hetero@ tc-app-list@ tc-app-apply@ tc-app-values@ tc-app-keywords@ + tc-app-objects@ tc-app-eq@ tc-app-lambda@ tc-app-special@)) diff --git a/collects/typed-racket/typecheck/tc-app.rkt b/collects/typed-racket/typecheck/tc-app/tc-app-main.rkt similarity index 97% rename from collects/typed-racket/typecheck/tc-app.rkt rename to collects/typed-racket/typecheck/tc-app/tc-app-main.rkt index 080182b8..6db849a7 100644 --- a/collects/typed-racket/typecheck/tc-app.rkt +++ b/collects/typed-racket/typecheck/tc-app/tc-app-main.rkt @@ -1,8 +1,8 @@ #lang racket/unit -(require "../utils/utils.rkt" - "tc-app/signatures.rkt" - "tc-app/utils.rkt" +(require "../../utils/utils.rkt" + "signatures.rkt" + "utils.rkt" syntax/parse racket/match syntax/parse/experimental/reflect (typecheck signatures check-below tc-funapp) diff --git a/collects/typed-racket/typecheck/tc-app/utils.rkt b/collects/typed-racket/typecheck/tc-app/utils.rkt index bd61f37c..262ab8d7 100644 --- a/collects/typed-racket/typecheck/tc-app/utils.rkt +++ b/collects/typed-racket/typecheck/tc-app/utils.rkt @@ -21,3 +21,4 @@ #:attributes (check) parse-option ... (pattern syntax-pattern pattern-directive ... #:attr check (lambda () body)) ...)))) + diff --git a/collects/typed-racket/typecheck/typechecker.rkt b/collects/typed-racket/typecheck/typechecker.rkt index 4843511e..35be0b78 100644 --- a/collects/typed-racket/typecheck/typechecker.rkt +++ b/collects/typed-racket/typecheck/typechecker.rkt @@ -6,7 +6,7 @@ provide-signature-elements define-values/invoke-unit/infer link) "signatures.rkt" - "tc-app/tc-app-combined.rkt" + "tc-app-combined.rkt" "tc-if.rkt" "tc-lambda-unit.rkt" "tc-let-unit.rkt" "tc-apply.rkt" "tc-expr-unit.rkt" "check-subforms-unit.rkt")