Custom Query (1630 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (58 - 60 of 1630)

Ticket Resolution Summary Owner Reporter
#484 fixed -scrutinize not properly expanding match macro. Alan Post
Description

I've encountered a problem using the match macro while having '-scrutinize' enabled.

I've attached a .scm file that uses the match egg testing four cases. Compiling this file with the following command:

csc -feature compiling-extension -setup-mode -s -scrutinize -j testegg -o testegg.so testegg.scm

Gives me the following error:

Error: (caddr) bad argument type: *

        Call history:

        <syntax>          (##core#let ((g670 ((make-bar "aisa" #f #t) "baz"))) (g670))
        <syntax>          ((make-bar "aisa" #f #t) "baz")
        <syntax>          (##core#let ((g672 (make-bar "aisa" #f #t))) (g672 "baz"))
        <syntax>          (make-bar "aisa" #f #t)
        <syntax>          (##core#begin (g672 "baz"))
        <syntax>          (g672 "baz")
        <syntax>          (##core#begin (g670))
        <syntax>          (g670)
        <syntax>          (newline)
        <syntax>          (##core#undefined)    <--

Error: shell command terminated with non-zero exit status 17920: /opt/chicken-master/bin/chicken testegg.scm -output-file testegg.c -dynamic -feature chicken-compile-shared -feature compiling-extension -setup-mode -scrutinize -emit-import-library testegg

This code compiles fine in the following conditions:

  • it runs fine in csi, this problem relates to the compiler.
  • it runs fine if you comment-out all but one case in match. The particular case doesn't matter, so long as there is only one of them.
  • it runs fine without the -scrutinizer command-line option.

I've confirmed this problem on experimental (df0bb192a6ac069e9d845d8445d96bf173e117fa: updated manifest) and 4.6.0. I'm running OpenBSD 4.8. C-Keen has confirmed this problem with Chicken 4.6.0.

#485 wontfix pretty-print should place keyword and keyword value on same line. Alan Post
Description

The following program:

(use extras)
(set! foo `(foo bar: bar baz: baz qux: qux))
(pretty-print `(,@foo ,@foo ,@foo))
(exit)

Produces the following output:

(foo bar:
     bar
     baz:
     baz
     qux:
     qux
     foo
     bar:
     bar
     baz:
     baz
     qux:
     qux
     foo
     bar:
     bar
     baz:
     baz
     qux:
     qux)

I think the output should instead be:

(foo bar: bar
     baz: baz
     qux: qux
     foo 
     bar: bar
     baz: baz
     qux: qux
     foo
     bar: bar
     baz: baz
     qux: qux)

That is, the keyword and it's argument should be on the same line.

This is a stylistic issue, but I hope I'm not the only who thinks pretty-print would look prettier in the second format.

#487 fixed matchable: crash matching a symbol when a production contains |...| Alan Post
Description

The following program:

(use matchable)

(pretty-print (map
  (match-lambda
    ((x ... y) `(,x ,y))
    (x         x))
  '((a c) (a b c) (a b b c) (a) (c) a)))
(exit)

Generates the following error message:

Error: (length) bad argument type - not a proper list: a

        Call history:

        <eval>    (#%= n109 tail-len102)
        <eval>    (#%reverse p-ls56)
        <eval>    (#%pair? ls104)
        <eval>    (#%null? (#%cdr ls104))
        <eval>    (#%cdr ls104)
        <eval>    (#%car ls104)
        <eval>    (##sys#cons x (##sys#cons y (##core#quote ())))
        <eval>    (##sys#cons y (##core#quote ()))
        <eval>    (#%length (quote103 (y)))
        <eval>    (#%length ls104)      <--

I would expect the output of the program to instead be:

(((a) c) ((a b) c) ((a b b) c) (() a) (() c) a)

The error message is being generated by the final element in the map, the symbol |a|. It seems to be a caused by the |...| operator in matchable.

With the following variation (substituted a single |.| for the |...|):

(use matchable)

(pretty-print (map
  (match-lambda
    ((x . y) `(,x ,y))
    (x         x))
  '((a c) (a b c) (a b b c) (a) (c) a)))
(exit)

The program does not generate the error message. It does generate a slightly different result, of course:

((a (c)) (a (b c)) (a (b b c)) (a ()) (c ()) a)

I'm running Chicken experimental de033aef6860a4b76d388810e73d3927fd553e95 on OpenBSD 4.8 in a VMWare virtual machine.

Note: See TracQuery for help on using queries.