Arc Forumnew | comments | leaders | submitlogin
3 points by eds 6139 days ago | link | parent

The error seems to be in ac-qq1, line 209, which uses map to look at nested structures in a quasiquote.

  ((pair? x)
   (map (lambda (x) (ac-qq1 level x env)) x))
And apparently scheme's map can't handle dotted lists.

Unfortunately I don't scheme well enough to know if another primitive does what we want... Otherwise we'll have to write a new version of map for use by quasiquote. (Or rewrite quasiquote to not use map at all, but that might be more work.)

I could do this but happen to be a little busy right now. (I wouldn't mind if someone were to beat me to it.)



4 points by mec 6139 days ago | link

Someone in an earlier thread of mine suggested this fix:

  ((pair? x)
   (cons (ac-qq1 level (car x) env) (ac-qq1 level (cdr x) env)))

-----

2 points by shlomif 6138 days ago | link

Thanks!

I applied the following patch eventually:

{{{{{{{{{ ((pair? x) - (map (lambda (x) (ac-qq1 level x env)) x)) + (let ((t (lambda (f) (ac-qq1 level (f x) env)))) + (cons (t car) (t cdr)))) }}}}}}}}}

-----

2 points by eds 6138 days ago | link

By the way, what is with the "{{{{{{{{{" and "<<<<<<<<" in your posts? (You can mark text as code by indenting it.)

-----

3 points by mec 6138 days ago | link

To use the auto code format add 2 newlines and the code indented by two spaces;

  like this

-----

2 points by shlomif 6138 days ago | link

Hi! Thanks for the tip.

I normally use "{{{" and "<<<<" as delimiteres in a plaintext . But obviously it doesn't work very well here, so I'll keep in mind to use indentation instead.

Thanks again.

-----