@@ -75,9 +75,7 @@ class Map(ir.Statement):
7575class Foldr (ir .Statement ):
7676 traits = frozenset ({ir .MaybePure (), lowering .FromPythonCall ()})
7777 purity : bool = info .attribute (default = False )
78- fn : ir .SSAValue = info .argument (
79- types .Generic (ir .Method , [ElemT , OutElemT ], OutElemT )
80- )
78+ fn : ir .SSAValue = info .argument (types .MethodType [[ElemT , OutElemT ], OutElemT ])
8179 collection : ir .SSAValue = info .argument (IListType [ElemT ])
8280 init : ir .SSAValue = info .argument (OutElemT )
8381 result : ir .ResultValue = info .result (OutElemT )
@@ -87,9 +85,8 @@ class Foldr(ir.Statement):
8785class Foldl (ir .Statement ):
8886 traits = frozenset ({ir .MaybePure (), lowering .FromPythonCall ()})
8987 purity : bool = info .attribute (default = False )
90- fn : ir .SSAValue = info .argument (
91- types .Generic (ir .Method , [OutElemT , ElemT ], OutElemT )
92- )
88+ fn : ir .SSAValue = info .argument (types .MethodType [[OutElemT , ElemT ], OutElemT ])
89+
9390 collection : ir .SSAValue = info .argument (IListType [ElemT ])
9491 init : ir .SSAValue = info .argument (OutElemT )
9592 result : ir .ResultValue = info .result (OutElemT )
@@ -104,7 +101,7 @@ class Scan(ir.Statement):
104101 traits = frozenset ({ir .MaybePure (), lowering .FromPythonCall ()})
105102 purity : bool = info .attribute (default = False )
106103 fn : ir .SSAValue = info .argument (
107- types .Generic ( ir . Method , [ OutElemT , ElemT ], types .Tuple [OutElemT , ResultT ])
104+ types .MethodType [[ OutElemT , ElemT ], types .Tuple [OutElemT , ResultT ]]
108105 )
109106 collection : ir .SSAValue = info .argument (IListType [ElemT , ListLen ])
110107 init : ir .SSAValue = info .argument (OutElemT )
@@ -117,7 +114,7 @@ class Scan(ir.Statement):
117114class ForEach (ir .Statement ):
118115 traits = frozenset ({ir .MaybePure (), lowering .FromPythonCall ()})
119116 purity : bool = info .attribute (default = False )
120- fn : ir .SSAValue = info .argument (types .Generic ( ir . Method , [ ElemT ], types .NoneType ) )
117+ fn : ir .SSAValue = info .argument (types .MethodType [[ ElemT ], types .NoneType ] )
121118 collection : ir .SSAValue = info .argument (IListType [ElemT ])
122119
123120
@@ -141,7 +138,7 @@ class Sorted(ir.Statement):
141138 purity : bool = info .attribute (default = False )
142139 collection : ir .SSAValue = info .argument (IListType [ElemT , ListLen ])
143140 key : ir .SSAValue = info .argument (
144- types .Union ((types .Generic ( ir . Method , [ ElemT ], ElemT ) , types .NoneType ))
141+ types .Union ((types .MethodType [[ ElemT ], ElemT ] , types .NoneType ))
145142 )
146143 reverse : ir .SSAValue = info .argument (types .Bool )
147144 result : ir .ResultValue = info .result (IListType [ElemT , ListLen ])
0 commit comments