remove syntax-error and call-with-compile-error-catch from compile.scm
authorAndy Wingo <wingo@pobox.com>
Tue, 16 Nov 2010 01:55:46 +0000 (02:55 +0100)
committerAndy Wingo <wingo@pobox.com>
Tue, 16 Nov 2010 01:57:27 +0000 (02:57 +0100)
* module/system/base/compile.scm: Remove unused syntax-error and
  call-with-compile-error-catch exports.

module/system/base/compile.scm

index 29c8d52..7c83fd7 100644 (file)
   #:use-module (ice-9 regex)
   #:use-module (ice-9 optargs)
   #:use-module (ice-9 receive)
-  #:export (syntax-error 
-            compiled-file-name
+  #:export (compiled-file-name
             compile-file
             compile-and-load
             read-and-compile
             compile
-            decompile)
-  #:export-syntax (call-with-compile-error-catch))
+            decompile))
 
-;;;
-;;; Compiler environment
-;;;
-
-(define (syntax-error loc msg exp)
-  (throw 'syntax-error-compile-time loc msg exp))
 
-(define-macro (call-with-compile-error-catch thunk)
-  `(catch 'syntax-error-compile-time
-        ,thunk
-        (lambda (key loc msg exp)
-          (if (pair? loc)
-               (let ((file (or (assq-ref loc 'filename) "unknown file"))
-                     (line (assq-ref loc 'line))
-                     (col (assq-ref loc 'column)))
-                 (format (current-error-port)
-                         "~A:~A:~A: ~A: ~A~%" file line col msg exp))
-               (format (current-error-port)
-                       "unknown location: ~A: ~S~%" msg exp)))))
-
-\f
 ;;;
 ;;; Compiler
 ;;;