Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 5.6k
    • Issues 5.6k
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 664
    • Merge requests 664
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Model experiments
  • Analytics
    • Analytics
    • 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
  • #22112

Tidy generates looping idInfo

As of a4212edc, Tidy loops on the following input, specifically in the output idInfo of foo:

{-# LANGUAGE NoImplicitPrelude #-}
module Rec where

foo :: () -> ()
foo = foo
ghc -dno-typeable-binds -fno-omit-interface-pragmas -fexpose-all-unfoldings -dverbose-core2core /tmp/a.hs
!!! Simplifier [Rec]: finished in 0.57 milliseconds, allocated 0.623 megabytes
*** CoreTidy [Rec]:
!!! CoreTidy [Rec]: finished in 0.05 milliseconds, allocated 0.036 megabytes

==================== Tidy Core ====================
Result size of Tidy Core
  = {terms: 2, types: 2, coercions: 0, joins: 0/0}

Rec {
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
foo [Occ=LoopBreaker] :: () -> ()

This is not just a debug output issue -- without -dverbose-core2core it still hangs, since the PartialModIface ends up with a loopy ifIdInfo in the IfaceId for foo.

Edited Aug 26, 2022 by Gergő Érdi
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking