Skip to content
GitLab
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 5,249
    • Issues 5,249
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 576
    • Merge requests 576
  • 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 CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #16592
Closed
Open
Issue created Apr 19, 2019 by Arnaud Spiwack@aspiwackDeveloper

Missing substitution in the simplifier?

When creating a binding (in the function completeBind), we simplify the unfolding in the binder before making a float (in the case we don't inline anyway). However, it seems that the newly obtained final_bndr is not substituted:

      ; let final_bndr = addLetBndrInfo new_bndr new_arity is_bot new_unfolding
      ; if postInlineUnconditionally env top_lvl final_bndr occ_info final_rhs
        then […] -- abbreviated
        else -- Keep the binding
             -- pprTrace "Binding" (ppr final_bndr <+> ppr new_unfolding) $
             return (mkFloatBind env (NonRec final_bndr final_rhs)) }

(See in full context here)

This is awfully suspicious: the new_arity and the new_unfolding will, I understand, not be available at the binder's use sites (which is where they are to be used).

I don't know how to make evidence of the suspected bad behaviour. And maybe I'm just missing something, and everything is actually fine here.

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