package haskell.lang;

import haskell.prelude.Function;
import haskell.prelude.Operator;

public abstract class AbstractExp<A>
        implements Exp<A> {

    final java.lang.String $expression;

    protected AbstractExp(final java.lang.String expression) {
        this.$expression = expression;
    }

    protected AbstractExp(final java.lang.String f, final Object... xs) {
        this(Function.expression(f, xs));
    }

    protected AbstractExp(
            final Object x, final java.lang.String op, final Object y) {
        this(Operator.expression(x, op, y));
    }

    // ---- java.lang.Object

    @Override
    public java.lang.String toString() {
        return $expression;
    }

}
