[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-kawa] [bug #49416] Error macro-expanding with-syntax with ... patte
From: |
AdriánMedraño Calvo |
Subject: |
[Bug-kawa] [bug #49416] Error macro-expanding with-syntax with ... patterns |
Date: |
Sat, 22 Oct 2016 18:06:40 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0 |
URL:
<http://savannah.gnu.org/bugs/?49416>
Summary: Error macro-expanding with-syntax with ... patterns
Project: Kawa
Submitted by: medranocalvo
Submitted on: Sat Oct 22 18:06:38 2016
Category: Scheme language
Severity: 3 - Normal
Item Group: Compile-time exception
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
The following code fails to run/compile with trunk kawa. The issue might be
related to Java 8: running it with Kawa r8803 built with Java 7 (an
installation I already had) seems to work alright, but the same revision built
with Java 8 throws the error at the end of the report.
Additionally, 'with-syntax' cannot be used without explicitly importing (kawa
lib std_syntax). I might make sense to export that directly from (scheme
base). I can open a separate ticket for this if you prefer.
=== somemodule.scm
(define-library (somemodule)
(import
(scheme base)
(kawa base)
(kawa lib std_syntax))
(begin
(define-syntax some-list
(lambda (stx)
(syntax-case stx ()
((_ a b rest ...)
(with-syntax (((thelist ...) (syntax (1 2 3))))
(syntax (list thelist ...)))))))
(display 3)
(display (some-list
aaa
bbb
(cons 3 222)
(cons 2 333)))))
(import (somemodule))
=== error message
somemodule.scm:12:14: ... follows template with no suitably-nested pattern
variable
somemodule.scm:15:5: evaluating syntax transformer 'some-list' threw
java.lang.RuntimeException: internal error - class gnu.expr.ErrorExp.eval
called
gnu.expr.Expression.apply(Expression.java:76)
gnu.mapping.CallContext.runUntilDone(CallContext.java:227)
gnu.mapping.CallContext.getFromContext(CallContext.java:256)
gnu.expr.Expression.eval(Expression.java:29)
gnu.expr.Expression.eval(Expression.java:44)
kawa.lang.Macro.expand(Macro.java:179)
kawa.lang.Macro.scanForm(Macro.java:227)
kawa.lang.Translator.scanForm(Translator.java:1576)
kawa.lang.Translator.scanBody(Translator.java:1634)
kawa.standard.begin.scanForm(begin.java:23)
kawa.standard.define_library.scanModulePass(define_library.java:124)
kawa.standard.define_library.scanForm(define_library.java:27)
kawa.lang.Translator.scanForm(Translator.java:1576)
gnu.kawa.lispexpr.LispLanguage.parse(LispLanguage.java:87)
gnu.expr.Compilation.process(Compilation.java:2089)
gnu.expr.ModuleInfo.loadEager(ModuleInfo.java:333)
kawa.standard.require.importDefinitions(require.java:287)
kawa.standard.ImportFromLibrary.handleImport(ImportFromLibrary.java:478)
kawa.standard.ImportFromLibrary.scanImportSet(ImportFromLibrary.java:291)
kawa.standard.ImportFromLibrary.scanForm(ImportFromLibrary.java:95)
kawa.lang.Translator.scanForm(Translator.java:1576)
gnu.kawa.lispexpr.LispLanguage.parse(LispLanguage.java:115)
gnu.expr.Language.parse(Language.java:775)
gnu.expr.Language.parse(Language.java:769)
kawa.Shell.compileSource(Shell.java:584)
kawa.Shell.runFile(Shell.java:555)
kawa.Shell.runFileOrClass(Shell.java:468)
kawa.repl.processArgs(repl.java:689)
kawa.repl.main(repl.java:811)
Thank you for your efforts. Best regards,
Adrián.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?49416>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Bug-kawa] [bug #49416] Error macro-expanding with-syntax with ... patterns,
AdriánMedraño Calvo <=