From 47e236a07cec0b4539e2718afaa678a0963335b2 Mon Sep 17 00:00:00 2001 From: Oscar Waddell Date: Wed, 23 May 2018 15:35:35 -0400 Subject: [PATCH] clarify "unknown module" error message in determine-module-imports original commit: 6af5ae075c4cce789d3528c3a6ef2620f90793e8 --- LOG | 2 ++ s/syntax.ss | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/LOG b/LOG index a4ed4474fd..6b73a069ec 100644 --- a/LOG +++ b/LOG @@ -999,3 +999,5 @@ misc.ms - flush expand-output and expand/optimize-output ports compile.ss +- clarify "unknown module" error message in determine-module-imports + syntax.ss diff --git a/s/syntax.ss b/s/syntax.ss index 119c6e51a7..a20e5c89b6 100644 --- a/s/syntax.ss +++ b/s/syntax.ss @@ -4071,7 +4071,7 @@ ; (and *) ; (or *) ; (not ) - (define (determine-module-imports what mid tid) + (define (determine-module-imports what who mid tid) (let ([binding (lookup (id->label mid empty-wrap) r)]) (case (binding-type binding) [($module) @@ -4087,7 +4087,7 @@ (values mid tid (make-import-interface x (diff-marks (id-marks tid) (interface-marks (get-indirect-interface x))))))] - [else (syntax-error mid "unknown module")]))) + [else (syntax-error who (format "unknown ~a" what))]))) (define (impset x) (syntax-case x () [(?only *x id ...) @@ -4222,13 +4222,13 @@ [else (f (cdr imps) o.n* (cons a new-imps))]))))))))] [mid (and (not std?) (id? #'mid)) - (determine-module-imports "module" #'mid #'mid)] + (determine-module-imports "module" #'mid #'mid #'mid)] [(?library-reference lr) (sym-kwd? ?library-reference library-reference) (let-values ([(mid tid) (lookup-library #'lr)]) - (determine-module-imports "library" mid tid))] + (determine-module-imports "library" #'lr mid tid))] [lr (let-values ([(mid tid) (lookup-library #'lr)]) - (determine-module-imports "library" mid tid))])) + (determine-module-imports "library" #'lr mid tid))])) (syntax-case impspec (for) [(?for *x level ...) (sym-kwd? ?for for)