Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,862
    • Issues 4,862
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 455
    • Merge requests 455
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #21481
Closed
Open
Created May 03, 2022 by Andreas Klebinger@AndreasKDeveloper

`tryEtaExpandRhs` might throw away useful strictness information for join points

I think currently for join points we trim the demand signature to the join arity. But that seems quite wasteful.

I noticed this while looking at #21429 (closed)

Imagine we have something like this:

[join_arity=1]
f_join = \x -> error

We know error has a signature of <1>bot so for \x -> error we would expect a signature like <A><1>bot.

However tryEtaExpandRhs trims the signature to arity one. So what we get is <A>top.

Which is correct! But we lost the knowledge that f_join foo bar will diverge.

Afaik we use eventual divergence for a variety of inline and floating decisions. So it's bound to make some difference. But I'm not sure how important this is in practice.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking