GetType - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

TypeTools

 GetType
 retrieve definition of user-defined type

 Calling Sequence GetType(typename)

Parameters

 typename - symbol; name of the type

Description

 • The definition for the type typename is returned.
 • This function can only be used to retrieve definitions of types that have been registered using TypeTools[AddType]. In particular, it cannot be used to retrieve built-in types.

Examples

 > ${\mathrm{TypeTools}}_{\mathrm{AddType}}\left(\mathrm{tff},'\left\{\mathrm{identical}\left(\mathrm{true}\right),\mathrm{identical}\left(\mathrm{false}\right),\mathrm{identical}\left(\mathrm{FAIL}\right)\right\}'\right)$
 > ${\mathrm{TypeTools}}_{\mathrm{GetType}}\left(\mathrm{tff}\right)$
 $\left\{{\mathrm{identical}}{}\left({\mathrm{FAIL}}\right){,}{\mathrm{identical}}{}\left({\mathrm{false}}\right){,}{\mathrm{identical}}{}\left({\mathrm{true}}\right)\right\}$ (1)
 > ${\mathrm{TypeTools}}_{\mathrm{AddType}}\left(\mathrm{integer7},t→\mathrm{evalb}\left(t::\mathrm{integer}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathbf{and}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathrm{irem}\left(t,7\right)=0\right)\right)$
 > $a≔{\mathrm{TypeTools}}_{\mathrm{GetType}}\left(\mathrm{integer7}\right)$
 ${a}{≔}{\mathrm{TypeTools/integer7}}$ (2)
 > $\mathrm{print}\left(a\right)$
 ${t}{↦}{\mathrm{evalb}}{}\left({t}{::}{\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{\mathrm{integer}}\right]\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{\mathbf{and}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{\mathrm{irem}}{}\left({t}{,}{7}\right){=}{0}\right)$ (3)