[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-developer] boot : valid type checker

From: Gregory Vanuxem
Subject: [Axiom-developer] boot : valid type checker
Date: Fri, 06 Apr 2007 18:29:45 +0200


At the boot level I want to know if a given type is valid. By type I
mean a category or a domain (parametrised if they must be). So for
example I want to know that 'Matrix(Character)' and 'Fields' are invalid
but not Matrix(Ring) and Matrix(Integer). There are several functions in
the interpreter for that but they are 'interactive' functions (in the
sense that they will throw an error if the type is not valid) or they do
not accept all possible categories. There is, for example, the function
'isValidType' but it seems to only accept domains and simple categories.
The nirvana would be a function that accepts things like
Matrix(Join(Foo,Bar)) [1]. 

Issues related are visible in the interpreter, try to type 
Matrix(Field) and List(Field).

Am I thinking wrong ?

Or may be you have some ideas or you know some functions that do what
I'm looking for ?


[1] This is doable, I think, via something like 'IGNORE_-ERRORS eval
mytype', but I would prefer a cleaner way.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]