Hello,
> operators with suitable associations defined). So
> my symbolic expression type should be an instance
> of the Num class so that the (+) operator can
> be overloaded for it. But, as the function has
> now three arguments, it cannot be a binary operator
> anymore.
maybe, an ad-hoc solution is to use an interpreter
which takes your infix expressions as strings and evaluates them in
the environment you like.
For the future, I would appreciate a redesign of the overloading
of operators in Haskell, such that any (also predefined) operator
can be overloaded according to the users taste,
e.g., to form an expression like
expr1 +e expr2
where e is some environment and the above expression is shorthand for
(+) e expr1 expr2.
--
Christoph Herrmann
E-mail: [EMAIL PROTECTED]
WWW: http://brahms.fmi.uni-passau.de/cl/staff/herrmann.html