We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f788c87 commit d4ed513Copy full SHA for d4ed513
src/Compiler/Optimize/InnerLambdasToTopLevelFuncs.fs
@@ -194,12 +194,10 @@ module Pass1_DetermineTLRAndArities =
194
let nFormals = vss.Length
195
let nMaxApplied = GetMaxNumArgsAtUses xinfo f
196
let arity = Operators.min nFormals nMaxApplied
197
- if atTopLevel then
198
- Some (f, arity)
199
- else if arity<>0 || not (isNil tps) then
200
201
- else
202
- None
+ if atTopLevel then Some (f, arity)
+ elif g.realsig && arity > 0 then None // This needs some investigation I sorta understand but would have a hard time explaining it
+ elif arity<>0 || not (isNil tps) then Some (f, arity)
+ else None
203
204
/// Check if f involves any value recursion (so can skip those).
205
/// ValRec considered: recursive && some f in mutual binding is not bound to a lambda
0 commit comments