aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog7
-rw-r--r--src/algebra/any.spad.pamphlet10
-rw-r--r--src/algebra/boolean.spad.pamphlet4
-rw-r--r--src/interp/compiler.boot6
4 files changed, 20 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 421e1630..aaf4c0cb 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
+2008-07-10 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * interp/compiler.boot (compQuote): Restrict quoting to literal
+ symbols.
+ * algebra/any.spad.pamphlet: Use nil for empty list.
+ * algebra/boolean.spad.pamphlet: Fix quoting.
+
2008-07-09 Gabriel Dos Reis <gdr@cs.tamu.edu>
* interp/i-spec2.boot (findConstantInDomain): Abstract from
diff --git a/src/algebra/any.spad.pamphlet b/src/algebra/any.spad.pamphlet
index 42a50805..e0e93817 100644
--- a/src/algebra/any.spad.pamphlet
+++ b/src/algebra/any.spad.pamphlet
@@ -337,11 +337,12 @@ Scope(): Public == Private where
Private ==> add
import Contour
+ Rep == List Contour
empty() ==
- '(())
+ per NIL$Lisp
contours s ==
- s pretend List(Contour)
+ rep s
findBinding(n,s) ==
for c in contours s repeat
@@ -394,11 +395,12 @@ Environment(): Public == Private where
++ the current category environment in the interpreter.
Private ==> add
+ Rep == List Scope
empty() ==
- '((()))
+ per NIL$Lisp
scopes e ==
- e pretend List(Scope)
+ rep e
getProperty(n,p,e) ==
v := get(n,p,e)$Lisp
diff --git a/src/algebra/boolean.spad.pamphlet b/src/algebra/boolean.spad.pamphlet
index b9761dcc..5ebd188d 100644
--- a/src/algebra/boolean.spad.pamphlet
+++ b/src/algebra/boolean.spad.pamphlet
@@ -253,7 +253,7 @@ PropositionalFormula(T: PropositionalLogic): PropositionalLogic with
notFormula(p: %): OutputForm ==
not? p =>
- elt(outputForm '_not, [notFormula((rep p).'unForm)])$OutputForm
+ elt(outputForm '_not, [notFormula((rep p).unForm)])$OutputForm
primaryFormula p
andFormula(p: %): OutputForm ==
@@ -488,7 +488,7 @@ Boolean(): Join(OrderedSet, Finite, Logic, PropositionalLogic, ConvertibleTo Inp
test a == a
nt b == (b => false; true)
- true == 'T
+ true == 'T pretend %
false == NIL$Lisp
sample() == true
not b == (b => false; true)
diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot
index 10657288..1d9686bc 100644
--- a/src/interp/compiler.boot
+++ b/src/interp/compiler.boot
@@ -828,7 +828,11 @@ compConstruct(form is ["construct",:l],m,e) ==
(T:= compVector(l,["Vector",CADR y],e)) and (T':= convert(T,m)) =>
return T'
-compQuote(expr,m,e) == [expr,m,e]
+++ Compile a literal (quoted) symbol.
+compQuote: (%Form,%Mode,%Env) -> %Maybe %Triple
+compQuote(expr,m,e) ==
+ expr is ["QUOTE",x] and SYMBOLP x => convert([expr,$Symbol,e],m)
+ stackAndThrow('"%1b is not a literal symbol.",[x])
compList: (%Form,%Mode,%Env) -> %Maybe %Triple
compList(l,m is ["List",mUnder],e) ==