<commit_before>package nl.utwente.group10.haskell.type;

import com.google.common.base.Joiner;

/**
 * Type of a Haskell function.
 */
public class FuncT extends ConstT {
    /**
     * @param arg The argument type that this function type accepts.
     * @param result The result type that this function type returns.
     */
    public FuncT(final Type arg, final Type result) {
        super("->", arg, result);
    }

    @Override
    public final String toHaskellType() {
        return "(" + Joiner.on(" -> ").join(this.getArgs()) + ")";
    }
}<commit_msg>Fix toString of FuncT<commit_after>package nl.utwente.group10.haskell.type;

import com.google.common.base.Joiner;

/**
 * Type of a Haskell function.
 */
public class FuncT extends ConstT {
    /**
     * @param arg The argument type that this function type accepts.
     * @param result The result type that this function type returns.
     */
    public FuncT(final Type arg, final Type result) {
        super("->", arg, result);
    }

    @Override
    public final String toHaskellType() {
        final StringBuilder out = new StringBuilder();
        final Type[] args = this.getArgs();

        out.append("(");

        for (int i = 0; i < args.length; i++) {
            out.append(args[i].toHaskellType());

            if (i + 1 < args.length) {
                out.append(" -> ");
            }
        }

        out.append(")");
        return out.toString();
    }
}
{'fraction_non_alphanumeric': 0.13130615065653076, 'fraction_numerical': 0.00414651002073255, 'mean_word_length': 2.276018099547511, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5394377', 'n_tokens_mistral': 443, 'n_tokens_neox': 425, 'n_words': 130}