diff --git a/libs/type/source/print.cpp b/libs/type/source/print.cpp index 28eb321..635b326 100644 --- a/libs/type/source/print.cpp +++ b/libs/type/source/print.cpp @@ -80,6 +80,14 @@ namespace pslang::type void print_impl(std::ostream & out, function_type const & type) { + if (type.arguments.size() == 1) + { + print(out, *type.arguments.front()); + out << " -> "; + print(out, *type.result); + return; + } + out << '('; bool first = true; for (auto const & argument : type.arguments)