[m-rev.] diff: Fix type_to_ctor_and_args for higher order types.

Peter Wang novalazy at gmail.com
Mon Feb 15 13:21:22 AEDT 2021


compiler/prog_type.m:
    Fix swapped "pred" and "func" in type_to_ctor_and_args.

diff --git a/compiler/prog_type.m b/compiler/prog_type.m
index 75bf78443..9d44a8d11 100644
--- a/compiler/prog_type.m
+++ b/compiler/prog_type.m
@@ -528,11 +528,11 @@ type_to_ctor_and_args(Type, TypeCtor, Args) :-
         Type = higher_order_type(PorF, Args, _HOInstInfo, Purity, _EvalMethod),
         (
             PorF = pf_predicate,
-            PorFStr = "func",
+            PorFStr = "pred",
             Arity = list.length(Args)
         ;
             PorF = pf_function,
-            PorFStr = "pred",
+            PorFStr = "func",
             Arity = list.length(Args) - 1
         ),
         SymName0 = unqualified(PorFStr),
-- 
2.30.0



More information about the reviews mailing list