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 644
    • Merge requests 644
  • 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
  • #22742

ghc panic: runtimeRepLevity_maybe

Summary

An ill-typed program triggers a panic while printing an error message.

Steps to reproduce

Compile this:

module Bug where

import GHC.Exts (TYPE)

data T (a :: TYPE r) = MkT

f :: T @(f a b) () -> ()
f MkT = ()

GHC tries to print an error message (as can be seen from the error code GHC-83865) but then panics:

Bug.hs:7:17: error: [GHC-83865]ghc: panic! (the 'impossible' happened)
  GHC version 9.7.20230110:
        runtimeRepLevity_maybe

'BoxedRep
Call stack:
    CallStack (from HasCallStack):
      callStackDoc, called at compiler/GHC/Utils/Panic.hs:189:37 in ghc:GHC.Utils.Panic
      pprPanic, called at compiler/GHC/Core/Type.hs:796:22 in ghc:GHC.Core.Type

Expected behavior

A proper error message.

Environment

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