From 27362ea43a4c1da88e23e3014c0fcb66ef7a2cfc Mon Sep 17 00:00:00 2001 From: dos-reis Date: Sat, 4 Oct 2008 21:41:59 +0000 Subject: * algebra/data.spad.pamphlet (sample$Byte): New. --- src/ChangeLog | 6 +++++- src/algebra/data.spad.pamphlet | 5 +++-- src/interp/c-util.boot | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index b6e432d8..283064d1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2008-10-04 Gabriel Dos Reis + + * algebra/data.spad.pamphlet (sample$Byte): New. + 2008-10-04 Gabriel Dos Reis * interp/c-util.boot (eqSubstAndCopy): New. @@ -14,7 +18,7 @@ 2008-10-03 Gabriel Dos Reis - * algebra/Makefile.pamphlet: Turn non optimization for algbera build. + * algebra/Makefile.pamphlet: Turn on optimization for algbera build. 2008-10-02 Gabriel Dos Reis diff --git a/src/algebra/data.spad.pamphlet b/src/algebra/data.spad.pamphlet index b491d001..e290fcd6 100644 --- a/src/algebra/data.spad.pamphlet +++ b/src/algebra/data.spad.pamphlet @@ -37,14 +37,15 @@ Byte(): Public == Private where ++ bitand(x,y) returns the bitwise `and' of `x' and `y'. bitior: (%,%) -> % ++ bitor(x,y) returns the bitwise `inclusive or' of `x' and `y'. - + sample: () -> % + ++ sample() returns a sample datum of type Byte. Private == add import Character byte(x: NonNegativeInteger): % == not (x < 256$Lisp) => userError "integer value cannot be represented by a byte" x : % - + sample() = byte(0@NonNegativeInteger) hash x == SXHASH(x)$Lisp coerce(x: NonNegativeInteger): % == byte x diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot index 567c1e47..5ffaf9c3 100644 --- a/src/interp/c-util.boot +++ b/src/interp/c-util.boot @@ -875,7 +875,7 @@ replaceSimpleFunctions form == NBUTLAST form -- 2.2. the substitution case. fun' is ["XLAM",parms,body] => - -- conversatively approximate eager semantics + -- conservatively approximate eager semantics and/[atom first as for as in tails args] => -- alpha rename before substitution. newparms := [GENSYM() for p in parms] -- cgit v1.2.3