Description
Differently than in WMA, Upvalues assigned to Atom types, like Real are not taken into account in evaluation
How to Reproduce
In[1]:= Unprotect[Real]; Real/:F[x_Real]:=x;F[3.]
Out[1]= 3.
$mathics -c 'Unprotect[Real]; Real/:F[x_Real]:=x;F[3.]'
Output Given
Got F[3.]
Expected behavior
If the Upvalue were taken into account, the result -like in WMA- would be
3.
Additional context
We would like that atoms like ByteArray use UpValues for defining rules associated to Normal or Part, to make the code more modular.
Description
Differently than in WMA, Upvalues assigned to
Atomtypes, likeRealare not taken into account in evaluationHow to Reproduce
Output Given
Got
F[3.]Expected behavior
If the Upvalue were taken into account, the result -like in WMA- would be
3.Additional context
We would like that atoms like
ByteArrayuseUpValuesfor defining rules associated toNormalorPart, to make the code more modular.