aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/syntax.spad.pamphlet
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-09-09 08:07:27 +0000
committerdos-reis <gdr@axiomatics.org>2011-09-09 08:07:27 +0000
commit096d1f6cdf716b2a22045872790743ebd49cc668 (patch)
tree6a9148128c48b6a22fa4817ef7ada97f541be1ca /src/algebra/syntax.spad.pamphlet
parent9e79f3fa920f7be823cc349ffb6252bce86c6167 (diff)
downloadopen-axiom-096d1f6cdf716b2a22045872790743ebd49cc668.tar.gz
* algebra/syntax.spad.pamphlet (Identifier): Remove
CoercibleTo Symbol and CoercibleTo String properties. * algebra/symbol.spad.pamphlet (Symbol): Make RetractableTo Identifier.
Diffstat (limited to 'src/algebra/syntax.spad.pamphlet')
-rw-r--r--src/algebra/syntax.spad.pamphlet14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/algebra/syntax.spad.pamphlet b/src/algebra/syntax.spad.pamphlet
index 2ab38358..783459b1 100644
--- a/src/algebra/syntax.spad.pamphlet
+++ b/src/algebra/syntax.spad.pamphlet
@@ -579,27 +579,23 @@ Literal(T: SetCategory): Public == Private where
<<domain IDENT Identifier>>=
++ Author: Gabriel Dos Reis
++ Date Created: July 5, 2008
-++ Date Last Modified: April 20, 2009
+++ Date Last Modified: September 7, 2011
++ Description:
-++ This domain represents identifer AST.
-++ This domain differs from Symbol in that it does not support
-++ any form of scripting.
-++ A value of this domain is a plain old identifier.
+++ This domain provides representation for plain identifiers.
+++ It differs from Symbol in that it does not support any form
+++ of scripting. It is a plain basic data structure.
++
)abbrev domain IDENT Identifier
Identifier(): Public == Private where
- Public == Join(SetCategory, CoercibleTo Symbol, CoercibleTo String) with
+ Public == SetCategory with
gensym: () -> %
++ \spad{gensym()} returns a new identifier, different from
++ any other identifier in the running system
Private == add
import %peq: (%,%) -> Boolean from Foreign Builtin
import %gensym: () -> % from Foreign Builtin
- import %sname: % -> String from Foreign Builtin
gensym() == %gensym()
x = y == %peq(x,y)
- coerce(x: %): Symbol == x : Symbol
- coerce(x: %): String == %sname x
coerce(x: %): OutputForm == x : OutputForm
@