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,930
    • Issues 4,930
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 461
    • Merge requests 461
  • 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
  • #15867
Closed
Open
Created Nov 06, 2018 by Csaba Hruska@trac-csabahruska

STG scope error

StgRhsClosure can contain duplicated names in its free variable and argument list.

Example bug: libraries/integer-gmp/src/GHC/Integer/Type.hs

GHC HEAD and 8.2.2 has this issue.

I have not checked with other versions.

I've extended the STG linter to do scope checking. See the patch attached.

To reproduce:

  • patch GHC head: git apply StgScopeCheck.patch
  • make sure every compiled stg is linted: add the following to mk/build.mk\\
GhcStage2HcOpts += -dstg-lint
GhcLibHcOpts += -dstg-lint
GhcRtsHcOpts += -dstg-lint
  • compile GHC HEAD

Background info: I've found this issue because I'm using GHC as a Haskell fronted for my whole program compiler project. I work on The GRIN Compiler (https://github.com/grin-tech) where GHC/GRIN compiles STG to GRIN.

Edited Mar 10, 2019 by Csaba Hruska
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking