Skip to content

Commit

Permalink
Add a trace message when a suspiciously inlinable handle might be gen…
Browse files Browse the repository at this point in the history
…erated
  • Loading branch information
dolio committed Dec 6, 2024
1 parent 986337a commit 50e5ae5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions unison-runtime/src/Unison/Runtime/ANF.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1976,6 +1976,8 @@ anfBlock (Handle' h body) =
(Indirect (), TApp (FVar vh) [v])
)
(ctx, (_, TVar v)) | floatableCtx ctx -> do
when (null hctx && null ctx) $
traceM "WARN: Potentially inlinable handle"
pure (hctx <> ctx, (Indirect (), TApp (FVar vh) [v]))
p@(_, _) ->
internalBug $ "handle body should be a simple call: " ++ show p
Expand Down

0 comments on commit 50e5ae5

Please sign in to comment.