On 2013-04-29, at 3:05 PM, Bradley Lucier lucier@math.purdue.edu wrote:
On 04/29/2013 02:54 PM, Marc Feeley wrote:
Indeed Gambit can be configured so that strict primitives do auto-forcing of promises. Just recompile Gambit with:
./configure --enable-auto-forcing make bootclean make
Then you'll be able to do this:
<omitted stuff> I just double-checked that it works.
Well, for some value of "works". Through visual examination of the output of
grep -C 1 '(define-prim ([^#]' _num.scm
it appears that make-random-source, flonum?, and fixnum? don't force their arguments.
Primitives like "cons" and "list" should not force their arguments because they are not strict (i.e. they don't need to know the value of the arguments).
It isn't clear if type predicates are strict or not. I can see arguments both ways.
If you notice a strict primitive that should force an argument and that doesn't, please let me know and I will fix it.
Marc