Skip to content
Snippets Groups Projects
Commit f0c1eb8b authored by Ben Gamari's avatar Ben Gamari Committed by Ben Gamari
Browse files

Conservatively estimate levity in worker/wrapper

The worker/wrapper transform needs to determine the levity of the result to
determine whether it needs to introduce a lambda to preserve laziness of the
result. For this is previously used isUnliftedType. However, this may fail in
the presence of levity polymorphism.

We now instead use isLiftedType_maybe, assuming that a lambda is needed if the
levity of the result cannot be determined.

Fixes #15186.

Test Plan: make test=T15186

Reviewers: simonpj, goldfire, tdammers

Reviewed By: simonpj

Subscribers: rwbarton, thomie, carter

GHC Trac Issues: #15186

Differential Revision: https://phabricator.haskell.org/D4755
parent c983a1db
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment