diff options
author | dos-reis <gdr@axiomatics.org> | 2009-01-28 08:15:05 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2009-01-28 08:15:05 +0000 |
commit | 3dfe242d21ca1835872a115b80de6f409a2c4835 (patch) | |
tree | 5c41b8ebbaa762ec124cb1f4326960043bbea9e6 /src/algebra | |
parent | ae24ace4c0535a261375e21af707befac3060ad9 (diff) | |
download | open-axiom-3dfe242d21ca1835872a115b80de6f409a2c4835.tar.gz |
* algebra/domain.spad.pamphlet (findConstructor$Constructor): New.
Diffstat (limited to 'src/algebra')
-rw-r--r-- | src/algebra/domain.spad.pamphlet | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/algebra/domain.spad.pamphlet b/src/algebra/domain.spad.pamphlet index 64415657..4d0cb784 100644 --- a/src/algebra/domain.spad.pamphlet +++ b/src/algebra/domain.spad.pamphlet @@ -70,11 +70,19 @@ ConstructorCategory(): Category == OperatorCategory Identifier with ++ Basic Operations: name, kind, arity. ++ Description: ++ This domain provides implementations for constructors. -Constructor(): ConstructorCategory == add +Constructor(): ConstructorCategory with + findConstructor: Symbol -> Maybe % + ++ \spad{findConstructor(s)} attempts to find a constructor + ++ named \spad{s}. If successful, returns that constructor; + ++ otherwise, returns \spad{nothing}. + == add Rep == Identifier name x == rep x kind x == getConstructorKind(x)$Lisp arity x == getConstructorArity(x)$Lisp + findConstructor s == + isConstructorName(s)$Lisp => just per(s pretend Identifier) + nothing @ |