Skip to content
  • Ben Gamari's avatar
    Conservatively estimate levity in worker/wrapper · f0c1eb8b
    Ben Gamari authored and Ben Gamari's avatar Ben Gamari committed
    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
    f0c1eb8b