Custom Query (1630 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (10 - 12 of 1630)

1 2 3 4 5 6 7 8 9 10 11 12 13 14
Ticket Resolution Summary Owner Reporter
#1771 fixed Except specificier in imports Idiomdrottning
Description

Note: this is with the patch for #1757 applied, for the future 5.3.0.

Here is the issue. If this is an egg,

cakes.scm:

(module cakes () (import scheme (chicken module) match-generics) (reexport

(rename scheme (define define-og)) (rename match-generics (define-dx define))))

cakes.egg

((synopsis "A min via for import except")

(components (extension cakes)))

And here is a file that uses that egg:

(import (except cakes define)) (define (lamp x) 19) (define (lamp x y) 21) (+ (lamp 13 41)

(lamp 12))

The expected behavior is for this to bork or crash.

Instead it evals to 40, as if we had imported

(import (only cakes define))

#1804 invalid compare doesn't compare if name is already bound Idiomdrottning
Description
(define-syntax frob-bad
  (ir-macro-transformer
   (lambda (exp inject compare)
     (let ((body (cdr exp)))
       `',(let desc ((friends '()) (body body))
	   (cond
	    ((null? body)
	     friends)
	    ((pair? body) (append (desc friends (car body)) (desc friends (cdr body))))
	    ((any (cut compare body <>) '(x y z rest args))
	     (cons (strip-syntax body) friends))
	    (else '())))))))


(equal?
 ((lambda (x) (frob-bad (reverse x))) 'foo) ; unexpected behavior. Since x is bound in the scope.
 ((lambda (p) (frob-bad (reverse x))) 'foo) ; expected behavior. Since x is not bound in the scope.
)
 
(define-syntax frob-good
  (ir-macro-transformer
   (lambda (exp inject compare)
     (let ((body (cdr exp)))
       `',(let desc ((friends '()) (body body))
	    (cond
	     ((null? body)
	      friends)
	     ((pair? body) (append (desc friends (car body)) (desc friends (cdr body))))
	     ((memq (strip-syntax body) '(x y z rest args))
	      (cons (strip-syntax body) friends))
	     (else '())))))))

(equal?
 ((lambda (x) (frob-good (reverse x))) 'foo) ; working workaround by eq? after strip-syntax instead of compare
 ((lambda (p) (frob-good (reverse x))) 'foo))
#1806 wontfix Finding missing dependencies Idiomdrottning
Description

So I forgot to add a dependency (brev-separate) and csc didn't find it, which is fair enough, it's on me.

But Teiresias pointed out that if I had jammed it into a module, csc would've found it:

Part of the magic of csc flagging errors for you lies in modules.  The
following would also have caught the missing dep when compiled by csc:

;; © 2022 Idiomdrottning, BSD 1-Clause License

(module main ()
(import fmt fmt-c tree)

(fmt #t
     (c-expr
      (tree-map
       (fn
	(case x ((fun) '%fun) ((var) '%var)
	      ((pointer) '%pointer) ((array) '%array)
	      ((cast) '%cast) (else x)))
       (read))))
)

So probably best to (module) everything as a matter of course.

(As in, he only added the (module main () …) wrapper and that made csc able to find the missing deps.) Sure. Only problem with that is that I don't wanna. Can't CSC apply the same magic even when there's no explicit module? Implicit is better than explicit.

1 2 3 4 5 6 7 8 9 10 11 12 13 14
Note: See TracQuery for help on using queries.