I am trying to compose a Spad function parseCall which parses from a
String a function call, for a certain restricted set of functions,
with parsing domain descriptions and the corresponding argument
descriptions, and a package call description -- given all in one String.
OK, so you want a function:
parseCall: String -> String
that takes a string parses it, calls the respective FriCAS function and
returns the result as a string?
But I met an obstacle: I do not know how to define a
_recursive tagged type_.
Is this a second question? Maybe you don't need that for the above function.
In fact, up to my knowledge you cannot have the tagged equivalent of a
Haskell type definition.
I've once started aldor-combinat that allows to define recursive types
by higher order operators, but I have the impression that would be too
much overhead for your purpose.
Look, for parseCall, you handle all the things inside parseCall, and
there why would you need other types (INT, Fraction, SUP) as the ones
that are already provided by FriCAS. I don't get that point.
Maybe I don't understand that correctly, but you have to parse the type
information of your string and form a (true) FriCAS type X out of that.
Then with the help of this type X you interpret the actual expression in
order to form an element of X.
Of course, if your expression is composed from subexpressions, you have
to do all that recursively. But I somehow don't see why one would have
to introduce a Union type like your proposed DomConstr.
Ralf
--
You received this message because you are subscribed to the Google Groups "FriCAS -
computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/fricas-devel?hl=en.