problems importing srfis

May 2, 2009 at 10:04 PM
I came across an error attempting to import an srfi:

 (import (srfi :1 lists))
Unhandled exception during evaluation:
&who: psyntax.compat::file-locator-resolution-error
&message: invalid argument count, expected 2 got 3
&irritants: ((srfi :1 lists) (h:\singollo\root\src\r6rs-clos/srfi/%3A1/lists.ironscheme.sls h:\singollo\root\src\r6rs-clos/srfi/%3A1/lists.sls h:\singollo\root\src\r6rs-clos/srfi/%3A1/ ./srfi/%3A1/lists.ironscheme.sls ./srfi/%3A1/lists.sls ./srfi/%3A1/ c:\Progra~1\IronScheme/srfi/%3A1/lists.ironscheme.sls c:\Progra~1\IronScheme/srfi/%3A1/lists.sls c:\Progra~1\IronScheme/srfi/%3A1/ c:\Progra~1\IronScheme\lib/srfi/%3A1/lists.ironscheme.sls c:\Progra~1\IronScheme\lib/srfi/%3A1/lists.sls c:\Progra~1\IronScheme\lib/srfi/%3A1/ ())
  [1]    at IronScheme.Runtime.Builtins.AssertionViolation(Object who, Object message, Object[] irritants)
  [2]    at IronScheme.Runtime.Closure.SimpleClosure.Call(Object[] args)
  [3] psyntax.library-manager::library-loader(Object x)
  [4] psyntax.library-manager::find-external-library#1#anon#1(CodeContext $context)
  [5]    at IronScheme.Runtime.Builtins.DynamicWind(Object infunc, Object bodyfunc, Object outfunc)
  [6] psyntax.expander::parse-import-spec*#letrec*#import-library(CodeContext $context, Object spec*)
  [7] psyntax.expander::parse-import-spec*#letrec*#add-imports!(CodeContext $context, Object imp, Object h)
  [8] psyntax.expander::parse-import-spec*#letrec*#letrec#f(CodeContext $context, Object imp*, Object h)
  [9] psyntax.expander::chi-body*#1#2#3#4#5#6#7#letrec*#library-import#1#2#3(CodeContext $context, Object ctxt, Object imp*)
  [10] psyntax.expander::chi-body*(CodeContext $context, Object e*, Object r, Object mr, Object lex*, Object rhs*, Object mod**, Object kwd*, Object exp*, Object rib, Object mix?, Object sd?)
  [11] psyntax.expander::chi-interaction-expr(Object e, Object rib, Object r)
  [12]    at IronScheme.Runtime.Builtins.DynamicWind(Object infunc, Object bodyfunc, Object outfunc)
  [13] psyntax.expander::expand(Object x, Object env)
  [14] psyntax.expander::eval(Object x, Object env)
  [15]    at IronScheme.Runtime.R6RS.Exceptions.WithExceptionHandler(Object handler, Object thunk)
  [16]    at IronScheme.Runtime.Builtins.CallWithCurrentContinuation(Object fc1)
Isn't that the correct syntax?

May 3, 2009 at 5:27 AM
Hi Matt

> Isn't that the correct syntax?

Yes, that is the suggested syntax for importing SRFI for R6RS.  I have not implemented that naming scheme yet.

For now you can simply do:

(import (srfi lists))

I will put it on my TODO list.


May 3, 2009 at 5:59 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
May 3, 2009 at 6:32 PM
Hi Matt

If you download the the latest source code, you will find this working  :)



PS: Thanks for the inspiration  :)