guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

with-contract issues


From: Stefan Israelsson Tampe
Subject: with-contract issues
Date: Sun, 18 Mar 2012 16:49:04 +0100

Hi,

Trying to implement with-contract I would like to mod define into a new variant
depending on if the symbol is a contracted variable or not, if it's a contracted
variable one should translate the define according to

(deifne f/contracted val)
->
(define-values () (begin (set! f/contracted val) (values)))

and just leave it else.

The problem is that either let-syntax and fluid-let-syntax works it looks like
define is hard coded into psyntax and is not macroexpanded if a macro is available
that is not the standard version. It would be cool to be able to mod define and have the same
functionality as in racket, currently one has to set! the contracted variables which is a bit hacky.

Regards
Stefan

reply via email to

[Prev in Thread] Current Thread [Next in Thread]