FunType extends ConcreteType { @Override public final String prettyPrint(final int fixity) { final StringBuilder out = new StringBuilder(); out.append(this.argument.prettyPrint(1)); out.append(" -> "); out.append(this.result.prettyPrint(0)); if (fixity > 0) { return "(" + out.toString() + ")"; } return out.toString(); } FunType(final Type arg, final Type res); Type getArgument(); Type getResult(); @Override final String prettyPrint(final int fixity); @Override FunType getFresh(TypeScope scope); @Override Type getConcrete(); @Override boolean containsOccurenceOf(TypeVar tvar); @Override String toString();  }
@Test public final void toHaskellTypeTest() { final Type integer = Type.con("Integer"); final Type function = Type.fun(integer, integer); assertEquals("Integer -> Integer", function.prettyPrint()); }