aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/symbol.spad.pamphlet
diff options
context:
space:
mode:
Diffstat (limited to 'src/algebra/symbol.spad.pamphlet')
-rw-r--r--src/algebra/symbol.spad.pamphlet7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/algebra/symbol.spad.pamphlet b/src/algebra/symbol.spad.pamphlet
index 7f80ecdb..e701270e 100644
--- a/src/algebra/symbol.spad.pamphlet
+++ b/src/algebra/symbol.spad.pamphlet
@@ -23,7 +23,8 @@ Symbol(): Exports == Implementation where
Scripts ==> Record(sub:L,sup:L,presup:L,presub:L,args:L)
Exports ==> Join(OrderedSet, ConvertibleTo InputForm,
- ConvertibleTo Symbol,CoercibleFrom String,
+ ConvertibleTo Symbol,CoercibleFrom String,
+ RetractableTo Identifier,
ConvertibleTo Pattern Integer, ConvertibleTo Pattern Float,
PatternMatchable Integer, PatternMatchable Float) with
new: () -> %
@@ -276,6 +277,10 @@ Symbol(): Exports == Implementation where
sy pretend List(%)
sample() == 'aSymbol
+ coerce(x: Identifier): % == x : %
+ retractIfCan(x): Union(Identifier,"failed") ==
+ scripted? x => x : Identifier
+ "failed"
@