Compare commits

..

2 Commits

Author SHA1 Message Date
Georges Dupéron
cc1dbf6d7f Ignore /doc/ folder 2016-04-01 13:31:30 +02:00
Georges Dupéron
a7b932630a Fix GitHub issue #2: REPL does not work with #lang datalog 2016-04-01 13:31:23 +02:00
2 changed files with 9 additions and 5 deletions

2
.gitignore vendored
View File

@ -1,5 +1,7 @@
# Racket compiled files # Racket compiled files
compiled/ compiled/
# Generated documentation
/doc/
# common backups, autosaves, lock files, OS meta-files # common backups, autosaves, lock files, OS meta-files
*~ *~

View File

@ -18,14 +18,16 @@
[else (default key defval)])) [else (default key defval)]))
(require datalog/parse (require datalog/parse
datalog/private/compiler) datalog/private/compiler)
(define (call-with-intro thunk) (define (call-with-intro thunk)
(define intro (make-syntax-introducer #t)) (define intro (make-syntax-introducer #t))
(parameterize ([current-datalog-introducer intro]) (parameterize ([current-datalog-introducer intro])
(intro (thunk)))) (intro (thunk))))
(define (this-read-syntax [src #f] [in (current-input-port)]) (define (this-read-syntax [src #f] [in (current-input-port)])
(quasisyntax/loc src ((make-syntax-delta-introducer #'here #f)
#,(compile-program (quasisyntax/loc src
(parameterize ([current-source-name src]) #,(compile-program
(parse-program in)))))) (parameterize ([current-source-name src])
(parse-program in))))
'remove)))