Print function types simpler when they have only 1 argument
This commit is contained in:
parent
af815e215a
commit
f22cd63a2a
1 changed files with 8 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue