You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The RoundtripPrinter (which is the default printer) displays the list of arguments of a function type in the wrong order: in the following code,
sig f : ((), (), (), (), (), (), (), (), (), Int) ~> Int
fun f(a, b, c, d, e, f, g, h, i, j) { j }
f((), (), (), (), (), (), (), (), (), 1)
f has the displayed type ((), Int, (), (), (), (), (), (), (), ()) ~> Int. This is because the string 10 is sorted before the string 2, even though the integer 2 is less than the integer 10.
Using the old Printer (--set types_pretty_printer_engine=old), f has the (correct) displayed type ((), (), (), (), (), (), (), (), (), Int) ~> Int thanks to the conversion to an IntMap. The DerivedPrinter does not have this issue as it displays the keys as well.